Skip to main content

Server Error (5xx)

HTTP/1.1

504 Gateway Timeout

The upstream server failed to send a timely response to the gateway proxy.

CategoryServer Error (5xx)
API error types1 error schema
Related headers3 headers
Updated2026-10-17

What does HTTP status code 504 mean?

The 504 Gateway Timeout status code indicates that a proxy server or gateway timed out waiting for a response from the backend application node.

When to use it in APIs

Generated by gateways when heavy queries, long-running processes, or external API dependencies block the execution thread beyond connection limits. A Proxy-Status header from the gateway says which wait expired, such as error=connection_timeout or error=http_response_timeout.

How it compares to other codes

  • 502 Bad Gateway: Means the backend returned an invalid response quickly. 504 means the backend took too long to return anything.

Problem types for 504

1