My Service Support

504 Status Code: What Gateway Timeout Means

Updated 2026-08-23 ยท 960 words

A 504 status code, usually shown as "504 Gateway Timeout", means one server waited too long for a reply from another server and gave up. It is an HTTP status code, which is the short number a web server returns to say how a request ended.

The page is not missing and your device is not broken. Something behind the website was too slow to answer within the time the front server allows.

What does a 504 status code actually mean?

Most websites are not one machine. A front server, called a gateway or proxy, takes your request and passes it to another server that does the real work. The gateway will wait only so long for that answer.

When the wait runs out, the gateway stops waiting and returns 504 to you. It is a report about the delay, not about what you asked for. The same page may load perfectly a minute later.

Is a 504 my fault or the website's?

Almost always the website's. The 500-series status codes are server-side by definition: they say the server failed to complete a valid request. The 400-series, such as 404 for a missing page, are the ones that point at the request you sent.

There is one exception worth checking. If a device, network or filtering service between you and the site is slow or misconfigured, it can produce timeouts that look identical. Testing on a different network settles it in under a minute.

How is 504 different from 502, 503 and 404?

  • 504 Gateway Timeout: the upstream server was reached but did not answer in time.
  • 502 Bad Gateway: the upstream server answered, but with something invalid, or the connection broke. Usually the application behind the site crashed.
  • 503 Service Unavailable: the server is up but deliberately refusing work, typically during maintenance or overload.
  • 404 Not Found: the server answered fine; the address does not exist.
  • 408 Request Timeout: the reverse case, where the server got tired of waiting for your browser to finish sending.

The practical difference: 504 and 503 are often temporary, while 404 will not fix itself by waiting.

What should I do first when I see a 504?

  1. Wait about a minute and reload once. Many gateway timeouts are momentary and clear on their own.
  2. Try the site's home address instead of the deep page you were on. If the home page loads, the timeout is tied to one slow operation.
  3. Open the same address on your phone using mobile data instead of wi-fi. If it works there, the problem is your network.
  4. Try a different browser, or a private window, to rule out an extension or a stale cached response.
  5. If a service status page exists for that site or app, check it before doing anything else.

Do not keep hammering reload. If the site is overloaded, repeated requests make the queue longer.

What can a visitor actually fix?

Not much on the server side, but a few local things do cause repeated 504s:

  • A VPN or proxy adding enough delay to cross the timeout. Turn it off and retry.
  • Custom DNS settings sending you to a slow or wrong server. Switch back to automatic settings and retry.
  • A browser extension that intercepts requests. Test in a private window with extensions disabled.
  • An old cached copy of the error page. Clear the cache for that site, or force a reload.

If it works on mobile data with the VPN off, you have found your cause and it was local.

What causes a 504 on a site I run?

  • A request that legitimately takes longer than the gateway's timeout: a large report, an import, a heavy search.
  • A database query with no index, slow only once the table grew.
  • An external service the code calls with no timeout of its own, so your request waits for someone else's outage.
  • Not enough worker processes, so requests queue behind each other until the front server gives up.
  • A firewall rule silently dropping packets between the gateway and the application, so the connection hangs instead of failing fast.

Look at the gateway log and the application log for the same second. If the application never logged the request at all, the failure is between the two servers. If it logged a start and no finish, the work itself is too slow.

Why does the 504 only happen on some pages?

Because only some pages do slow work. Static pages are served in milliseconds; a search across a large dataset, an export, or a page that calls a payment or shipping service can take seconds. The timeout is a fixed limit, so only the slow paths cross it.

That pattern is useful information. A 504 on one page and instant loads everywhere else points straight at what that page does differently, and it means the server itself is healthy.

What if the 504 appears while submitting a form?

Assume the action may have gone through. The timeout describes the answer you did not get, not the work the server did or did not do. Submitting again can create a duplicate.

Reload the page, check the list, order history or account section to see whether the action was recorded, and only repeat it if it clearly was not. If the site sends confirmation emails, wait a few minutes for one before trying again.

When should I contact support?

Contact the site's support when the 504 repeats over several hours, appears on every page rather than one, or blocks something time-sensitive. Give them the exact time with your time zone, the full address of the page, what you were doing, the exact error text, and whether it also failed on another network. That last detail saves the first round of questions.