HTTP status code 504 — Gateway Timeout

Quick answer

Status code 504 (Gateway Timeout): Upstream server did not respond in time. Proxy waited too long for origin — check slow queries and timeouts.

Proxy waited too long for origin — check slow queries and timeouts.

504 is a timeout at the gateway, not necessarily a crash. Profile origin latency and align proxy idle timeouts.

Common causes

How to fix it

Profile what is slow on the origin (often a query) and consider raising the proxy timeout only after confirming the origin is not just hung.

All HTTP status codesJSON Formatter

Related: 503502500451429

Frequently asked questions

What is status code 504?

504 Gateway Timeout: Upstream server did not respond in time. Proxy waited too long for origin — check slow queries and timeouts.

When should I expect HTTP 504?

504 is a timeout at the gateway, not necessarily a crash. Profile origin latency and align proxy idle timeouts.

What usually causes HTTP 504?

A slow database query or long-running job blocking the response; Proxy timeout set shorter than the origin actually needs.

How do I fix HTTP 504?

Profile what is slow on the origin (often a query) and consider raising the proxy timeout only after confirming the origin is not just hung.

Where can I see all status codes?

Open the HTTP status codes hub on TryDevSnip for the full reference list.

Does TryDevSnip log my API traffic?

No. These pages are static reference. TryDevSnip does not proxy or inspect your HTTP calls.

TryDevSnip