HTTP Reference
HTTP 504 Gateway Timeout
A gateway or proxy timed out waiting for an upstream response.
Common Causes
- Upstream API latency exceeded gateway timeout.
- Long-running query or downstream lock contention.
- Transient network partitions between services.
Debugging Notes
- Tune upstream timeouts and budget request deadlines end-to-end.
- Add caching, queuing, or async processing for heavy operations.
Example Response
{
"status": 504,
"error": "Gateway Timeout",
"message": "Upstream timeout"
}