HTTP 5xx

504 Gateway Timeout

A gateway or proxy did not get a timely response from the upstream server.

5xx Server errorCommonly seen

What causes it

  • A slow upstream app, a long-running query, or an unresponsive backend.

How to fix it

Find and speed up the slow upstream request. Check database queries, external API calls, and backend timeouts.

Example response

A typical raw HTTP response a client receives for a 504, with the headers this code is defined around.

HTTP/1.1 504 Gateway Timeout
Content-Type: text/html; charset=utf-8

Know before your visitors do.

Sentinel checks your site around the clock from multiple regions and alerts you the moment it starts returning a 5xx error, so you can fix it before it costs you.