What does HTTP status 504 (Gateway Timeout) mean?

 
Previous Next
HTTP_STATUS_SERVICE_UNAVAIL HTTP_STATUS_VERSION_NOT_SUPPORTED

HTTP_STATUS_GATEWAY_TIMEOUT

The timeout occurs while the gateway is waiting for a dependency needed to complete the request. It is distinct from 408, where the server waited too long for the client request.

Measure each hop: DNS, connect, TLS, request upload, application execution, and upstream response. Align timeout settings deliberately; raising only the proxy timeout can hide a blocked or overloaded backend.

A 504 tells you that an intermediary waited for another server and exceeded its response deadline. Measure DNS, connect, TLS, and upstream response times separately where possible. Raising the gateway timeout can hide a slow dependency, so first determine whether the upstream is overloaded, blocked, or executing an unexpectedly expensive request.

RFC 9110: HTTP Semantics


Looking for a different code? Search another status or error code.