Gateway Timeout
A proxy or load balancer forwarded your request and gave up waiting for the server behind it to answer.
The proxy's timeout decides when that happens. Nginx's proxy_read_timeout defaults to 60 seconds, as does the AWS ALB idle timeout. Cloudflare doesn't send 504 for this. It returns its own 524 after 125 seconds.
If your client's timeout is shorter than the proxy's, the client gives up first and never sees the 504. That's why monitoring tools often report a timeout where a browser would eventually show a 504.
What we see on Larm
Failed HTTP checks on Larm from 9 October to 8 November 2026, across about 130 monitors.
One monitor got a 504 in this period, 2 failed checks in total. That's far fewer than 502 or 503, and timeouts are the reason. Larm's default check timeout is 10 seconds, shorter than most proxies wait before sending a 504, so a slow app shows up as a timeout first. In the same period, 12,175 checks timed out, on 121 of the roughly 130 HTTP monitors.
COMMON CAUSES
HOW TO FIX IT
What this means for monitoring
Watch response times, not just up or down. A 504 is often the end of a period of rising response times, and Larm's request traces show which phase got slow.
Related status codes
5xx Server Error
Something went wrong on the server and it has nothing more specific to say. It's what most frameworks return when your code throws an exception it doesn't handle.
A server in the middle, like a load balancer, reverse proxy or CDN, tried to pass your request on to the server behind it and got back something it couldn't use. Either the upstream server didn't answer properly, or the connection closed before a full response came back.
The server is up but can't handle the request right now. It's meant to be temporary: overload, maintenance, or an app that isn't ready yet.
Cloudflare-specific. Cloudflare connected to your origin server and got a response it couldn't use, or no response at all.
Cloudflare-specific. Cloudflare tried to connect to your origin server and the connection was refused.
Cloudflare-specific. Cloudflare tried to connect to your origin and the connection timed out.
Cloudflare-specific. Cloudflare can't find a network route to your origin server.
Cloudflare-specific. Cloudflare connected to your origin but couldn't complete the TLS handshake with it.
Cloudflare-specific. Cloudflare couldn't find where to send the request: it couldn't resolve the origin's hostname, or the Cloudflare Tunnel for it isn't connected.
Get alerted when your endpoints return unexpected status codes.
Larm checks your HTTP endpoints from multiple global locations and alerts you when they return status codes outside your expected range.