Home > Error > 504
504 Gateway Timeout
The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.
This is usually a temporary state — the upstream service may be slow, overloaded, or in the middle of a restart. Retrying the request after a short delay almost always succeeds.
What this means
- Your request reached our edge proxy successfully
- The edge proxy forwarded the request to the upstream service
- The upstream service did not respond within the allowed time window
- The edge proxy closed the connection and returned this 504 response
- None of your data was lost; the upstream simply never replied in time
Timing breakdown
| +0.00s | request received at edge | OK |
| +0.01s | upstream selected: api-cluster-3 | OK |
| +0.04s | upstream connected | OK |
| +5.00s | waiting for first byte from upstream... | — |
| +15.0s | still waiting... | — |
| +25.0s | still waiting... | — |
| +30.0s | upstream did not respond — closing | TIMEOUT |
| +30.4s | 504 emitted to client | GIVE UP |
Common causes
- The upstream service is processing a long-running operation
- A database query is blocked or unusually slow
- The upstream is overloaded and queue depth exceeded
- A network partition between edge and upstream
- The upstream is restarting and not yet accepting requests
Related codes
| Code | Difference |
| 500 | Upstream replied, but the reply caused an internal error |
| 502 | Upstream replied with malformed data |
| 503 | Upstream is intentionally offline or overloaded |
| 504 | Upstream did not reply at all within the allowed window |
Request information
Status:504 Gateway Timeout
Upstream:api-cluster-3
Timeout:30 seconds
Elapsed:30.4 seconds
Method:GET
Request URI:/api/v2/reports
Request ID:req_8c91-2f04-aa72
Edge:edge-04 (ams)
Time:Tue, 19 May 2026 14:18:21 GMT
Tip: If you're calling this endpoint programmatically, consider lowering the payload size or polling for the result instead of waiting on a long synchronous call.
Caution: Aggressively retrying immediately after a 504 can worsen the situation if the upstream is overloaded. Use exponential backoff with jitter.
What to do next
- Wait a few seconds and try the request again
- If you control the upstream, check its load and queue depth
- For long-running operations, switch to an asynchronous job pattern
- Visit the status page to confirm whether others are affected
- If urgent and persistent, contact support with the request ID
edge proxy 1.4 — running on Linux server — IPv4/IPv6 — TLS 1.3