IT Toolbox
Menu
HomeHTTP 504 — Gateway Timeout
Error code

HTTP 504 — Gateway Timeout

HTTP 504 Gateway Timeout occurs when a gateway does not receive a timely response from an upstream server.

TopicComputer error codes → About 1 min read

HTTP 504 — Gateway Timeout

Category: HTTP | Priority: High

What does HTTP 504 Gateway Timeout mean?

A gateway or reverse proxy did not receive an upstream response within its configured timeout period.

Likely causes of HTTP 504

  • An application backend responding too slowly
  • Long database queries or blocked dependencies
  • Proxy or load balancer timeouts shorter than the expected request time
  • Network interruptions between proxy and application server

How to diagnose and fix HTTP 504

  1. Record the affected URL, exact time and how long the timeout takes.
  2. Measure the backend response time directly from the proxy host.
  3. Inspect slow database queries, queue backlogs and third-party services.
  4. Compare proxy, application and load-balancer timeout thresholds.
  5. Fix bottlenecks before increasing limits, then retest.

Increasing proxy timeouts without fixing a slow backend may conceal the problem rather than resolve it.

Return to the HTTP error code reference.

HTTP 504 vs 502: what is the difference?

HTTP 504 indicates that an upstream response did not arrive in time. HTTP 502 indicates that the response received by the gateway was invalid or unusable. Inspect logs to tell a timeout from a broken upstream connection.

Support the development of BAOI Hosting, domains and new IT resources.
❤️ Support BAOI

My favorites