HTTP 504 Gateway Timeout — What It Means
What HTTP status code 504 Gateway Timeout means, when servers return it, and how to handle it correctly.
Published September 26, 2026
HTTP 504 Gateway Timeout — A gateway or proxy server didn't receive a timely response from an upstream server.
Key points
- Means a proxy or gateway timed out waiting for a response from an upstream server
- Common when a backend request takes longer than the proxy's configured timeout, e.g. a slow database query
- Increasing the timeout only helps if the slow operation is expected — otherwise fix the underlying slowness