HTTP status · 5xx — server error

504 Gateway Timeout

504 Gateway Timeout means a gateway or proxy did not receive a timely response from an upstream server.

Key facts

Class5xx — server error
StandardRFC 9110 §15.6.5
Cacheable by defaultNo
CauseUpstream did not answer within the proxy timeout
Typical layerReverse proxy, CDN, load balancer

What 504 means

The proxy waited for an upstream response and gave up. The upstream may be slow, stuck, or unreachable in a way that produces no response at all. The client's request may have reached the upstream and may even still be running — a 504 is a statement about the proxy's patience, not about the final outcome.

How to diagnose a 504

Frequently asked questions

What is the difference between 504 and 502?

502 means the upstream sent an invalid response. 504 means it sent no timely response at all.

Did my request succeed if I get a 504?

Possibly. A 504 is the proxy giving up, not necessarily the upstream failing. Check the upstream logs or state before retrying a non-idempotent request.

Why does a 504 appear only for some users?

Timeouts are sensitive to latency and load. A slow query or a cold backend can affect only the requests that hit the overloaded path or region.

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.