504 Gateway Timeout
A gateway or proxy timed out waiting for the upstream server to respond. Like 502, an origin-side problem — but specifically about slowness, not an invalid reply.
What it means
504 Gateway Timeout means an intermediary gave up waiting for the upstream to respond within its timeout window. Where 502 is an invalid upstream response, 504 is no timely response at all — usually a slow query, saturated backend, or a too-short gateway timeout.
Why it matters
- It pinpoints latency between gateway and origin as the failure cause.
- It distinguishes 'origin too slow' (504) from 'origin replied garbage' (502).
Common mistakes
- Gateway timeouts shorter than legitimate long-running requests.
- Blaming the client for what is an upstream latency problem.
How WebInspect checks this
- WebInspect measures TTFB and connection timings and flags 5xx responses like 504.