504

HTTP 504 Gateway Timeout

5xx Server Error

  1. Home
  2. > HTTP Status Codes >
  3. > 5xx >
  4. 504
5xx Server Error RFC 7231, Section 6.6.5

What is HTTP 504 Gateway Timeout?

The 504 (Gateway Timeout) status code indicates that the server, while acting as a gateway or proxy, did not receive a timely response from an upstream server. Unlike 502 (Bad Gateway) which indicates an invalid response, 504 specifically means the upstream server did not respond within the timeout period.

Common Use Cases

  • Slow upstream database queries
  • External API timeout behind proxy
  • Application server hung or deadlocked
  • CDN origin server timeout
Help2Code Logo
Menu