Error 504: Gateway Timeout
Is your server responding too slowly? Check right here how long your site takes and whether it fails with a 504.
Checks the status code, every redirect, the variants with and without www and over http and https, the SSL certificate and the response time.
Free, no sign-up - no data about you is stored.
Result
Technical finding without guarantee. The check runs once from a server in Germany. If your website is only unreachable from certain networks or countries, the result may differ.
What does Error 504 mean?
Like a 502, a 504 Gateway Timeout happens when two servers work together. The server in front, such as nginx, a load balancer or Cloudflare, passed the request on and got a connection, but the response didn't arrive within the configured time. So it gives up and reports 504.
The server behind may still be working, the response just never makes it back. An import, an order or a backup may therefore have completed despite the 504. With Cloudflare, the equivalent error is 524.
Common causes.
Long-running tasks
Imports, exports, backups, image processing or large reports take longer than the proxy is willing to wait.
Slow database
Expensive queries, missing indexes or a bloated database slow down every page.
External services hang
While loading, the site waits for a third-party API, for license checks, reviews or shipping, that doesn't respond.
All PHP workers busy
New requests have to wait until a worker is free. Under load the queue grows until the proxy gives up.
Timeouts don't match
The proxy waits less time than PHP is allowed to run. So the proxy gives up while PHP is still legitimately working.
With WordPress and hosting.
On WordPress, 504s are common in the dashboard: importing products, regenerating image sizes, running backups through a plugin or updating many plugins at once. Page builders that do heavy work on save also run into timeouts. On the front end it is usually slow database queries, plugins that call external services on every request, or missing caching.
In a chain of Cloudflare, nginx and PHP-FPM, every step has its own time limit. They need to match, otherwise one step gives up while the next is still waiting. On shared hosting your host sets these values. The PHP limit max_execution_time can often be changed in the panel, the proxy timeout usually can't.
How to fix it.
Measure the response time
The checker above shows how long the page takes. If it already takes several seconds without an error, the 504 is just the tip of the iceberg.
Check the result, don't just retry
If the 504 came during an order, import or update, first check whether the action completed before starting it again.
Split up big tasks
Import in smaller batches, run backups on a schedule outside the browser, update plugins one at a time instead of all at once.
Find slow plugins
A profiling plugin like Query Monitor shows which queries and external calls take long. Replace slow plugins or configure them differently.
Use caching
A page cache serves finished pages without involving PHP and the database. That cuts response times drastically for most visitors.
Align the time limits
If the code is fine and the task is simply big, the timeouts along the chain can be raised. That's a server setting, and on shared hosting it's up to your host.
Impact on Google.
Google treats 504 like any other 5xx error: crawling slows down, and if the errors persist, pages drop out of the index. On top of that, slow responses hurt even without errors, because Google crawls slow servers less and visitors bounce.
A 504 is almost always a sign of a speed problem. If your site is slow in general, a combination of caching, clean-up and suitable managed WordPress hosting helps.
Help from a developer
I can take care of it.
The check shows where things go wrong. I am happy to fix it, once or on an ongoing basis.
Good to know
Questions about Error 504?
The most common questions, answered briefly.
Questions about Error 504
What's the difference between 504 and 502?
With 504 the connection works but the response comes too late. With 502 the response is broken or missing entirely.
Did my order go through despite the 504?
Possibly, since the server may have kept working. Check your emails and customer account before ordering again.
What is a Cloudflare 524?
Cloudflare's version of a timeout: the connection to the server was established, but it didn't respond for 100 seconds.
All status codes at a glance.
2xx: Success
- 200OKAll good: the server understood the request and delivers the page.
- 201CreatedThe request succeeded and created something new, for example a record via an API.
- 204No ContentSuccessful, but the response has no body. Typical for APIs and background requests, not for regular pages.
3xx: Redirects
- 301Moved PermanentlyPermanent redirect: the page now lives at a new address. Search engines switch to the new URL.Causes and fixes →
- 302FoundTemporary redirect: the page is currently available at another address, the original URL stays valid.Causes and fixes →
- 303See OtherRedirect to another page that is fetched with GET, typically after submitting a form.
- 304Not ModifiedThe page has not changed since the last visit, so the browser uses its cached copy. Not an error.
- 307Temporary RedirectTemporary redirect like 302, but the request method (such as POST) is guaranteed to stay the same.
- 308Permanent RedirectPermanent redirect like 301, but the request method (such as POST) is guaranteed to stay the same.
4xx: Client errors
- 400Bad RequestThe server can't process the request because it is malformed, for example due to oversized cookies or a broken URL.Causes and fixes →
- 401UnauthorizedThis page requires you to log in, for example via server-side password protection. No valid credentials, no access.Causes and fixes →
- 403ForbiddenThe server understood the request but refuses access, for example because of file permissions, a firewall or a block.Causes and fixes →
- 404Not FoundThere is no page at this address. It was deleted, moved, or the URL is misspelled.Causes and fixes →
- 405Method Not AllowedThe address exists but doesn't accept this kind of request, such as a POST where only GET is allowed.
- 408Request TimeoutThe server waited too long for the complete request and closed the connection, often on a slow connection.
- 410GoneThe page was removed deliberately and permanently and won't come back. A clearer signal than 404.Causes and fixes →
- 429Too Many RequestsToo many requests in a short time: a rate limit or bot protection is temporarily slowing down access.Causes and fixes →
- 451Unavailable For Legal ReasonsThe page is blocked for legal reasons, for example by an official order or a country block.
5xx: Server errors
- 500Internal Server ErrorGeneric server error: something went wrong while building the page. With WordPress it is usually a plugin, theme or PHP issue.Causes and fixes →
- 501Not ImplementedThe server doesn't know or support the request method. Rare on regular websites.
- 502Bad GatewayA server in front (proxy, nginx, CDN) didn't get a usable response from the actual server, often because PHP crashed.Causes and fixes →
- 503Service UnavailableThe server is temporarily unavailable due to maintenance or overload. Try again later.Causes and fixes →
- 504Gateway TimeoutA server in front waited too long for the actual server to respond and gave up.
- 520Web Server Returned an Unknown ErrorCloudflare error: the server behind Cloudflare sent an empty, invalid or unexpected response.
- 521Web Server Is DownCloudflare error: the server behind Cloudflare refuses the connection, so it is down or blocking Cloudflare.
- 522Connection Timed OutCloudflare error: Cloudflare couldn't establish a connection to the server behind it in time.
- 523Origin Is UnreachableCloudflare error: the server behind it can't be reached, often because of a wrong IP address in the DNS records at Cloudflare.
- 524A Timeout OccurredCloudflare error: the connection to the server works, but it didn't respond in time (100 seconds by default).
- 525SSL Handshake FailedCloudflare error: the encrypted connection between Cloudflare and the server behind it could not be established.
- 526Invalid SSL CertificateCloudflare error: the SSL certificate on the server behind Cloudflare is invalid or expired (with SSL mode "Full (strict)").
No status code: connection errors
- ×Server not found (DNS)There is no server for this domain: it has expired, is misconfigured, or the record with the IP address is missing.Causes and fixes →
- ×Connection refusedThe server is known but doesn't accept connections. The web server isn't running or a firewall is blocking.
- ×TimeoutThe server didn't answer in time. It is overloaded, stuck, or not reachable at all.
- ×Certificate error (SSL)The SSL certificate has expired, doesn't cover this domain, or the certificate chain is incomplete. Browsers show a warning.Causes and fixes →

