Is the website down, or just you?
A 504 Gateway Timeout comes from a gateway server, such as a CDN, load balancer or proxy, that forwarded your request to the website's main server and waited too long for an answer.
It usually means the website's server is overloaded, stuck on a slow task, or unreachable from the gateway. It's rarely caused by your own device.
What you can do
- Reload after a minute or two. Timeouts often happen during traffic spikes.
- Check if it's down for everyone with our website checker.
- Try a different network or turn off your VPN or proxy. If you're on a work network, its proxy can be the gateway that times out.
- Restart your router if every site is slow.
If you run the website
- Find slow requests: long database queries, calls to slow third-party APIs, or large exports that should run in the background.
- Check server load and whether workers are all busy.
- Compare the proxy's timeout settings (for example Nginx
proxy_read_timeout) with how long your application really needs. - Behind Cloudflare, an origin that takes more than 100 seconds to respond produces error 524 instead.
Questions
Is a 504 Gateway Timeout my internet?
Usually not. It means servers on the website's side didn't respond to each other in time. If every site gives you errors, though, restart your router.
What's the difference between a 504 and a 502?
With a 504 the server behind the gateway didn't answer in time. With a 502 it answered, but with something invalid, or the connection failed.