504

Gateway Timeout

5xx · Server Error

The upstream server failed to respond in time.

What does HTTP 504 Gateway Timeout mean?

A server acting as a gateway or proxy did not receive a timely response from the upstream server. The request reached the origin, but it took too long to reply.

5xx responses indicate the server failed to fulfil a valid request. The problem is on the server side and is not something the client can fix by changing the request.

Common causes

  • Slow or hung upstream/origin server
  • Long-running queries or operations exceeding timeouts
  • Network issues between proxy and origin

How to fix a 504 error

  • Optimize slow upstream operations and queries
  • Increase proxy timeout limits if appropriate
  • Add caching or async processing for long tasks

Related 5xx status codes

Look up and search every HTTP status code in one place.

Open the HTTP Status Code tool