Errors / HTTP errors
504 Gateway Timeout
The server in front waited for the application behind it, and gave up.
The page never arrives; for a request inside a page, a spinner that ends in nothing.
Seeing it on someone else’s site?
- The site is too slow to answer right now; it is not your connection.
- Try again later, or a lighter page on the same site: a 504 is often one slow page, not all of them.
Why it happens, if it is your site
- A slow request: a heavy database query, a report, an export, a call to a slow third-party API, all inside one page load.
- The application overloaded and queueing requests until the proxy's timeout (60 seconds on nginx by default, 100 on Cloudflare).
- A firewall between the proxy and the app silently dropping the connection.
How to fix it
- Find which request is slow (the server's logs, or timing each endpoint) and make it faster, or move the work to a background job.
- Raise the timeout only for the endpoint that needs it (
proxy_read_timeoutin nginx), not for the whole site. - Behind Cloudflare, anything over 100 seconds needs a background job; the limit cannot be raised on most plans.
Whose problem it is
Usually the server that answers the request.
Does your site have it?
Free, no account. We open your page and four more in a clean Chrome and list every error like this one, with the page and the click that caused it. How the free page check works.
Often seen with
- 502 Bad GatewayThe server you reached works, but the application behind it did not answer properly.
- 503 Service UnavailableThe server is up but cannot handle the request right now: overloaded, or in maintenance.
- ERR_CONNECTION_TIMED_OUT / ERR_TIMED_OUTThe server took too long to answer, and the browser gave up.