Skip to main content
Web & HTTP Errors

How to Fix 504 Gateway Timeout Error

Zone Desire troubleshooting feature image
504 Gateway Timeout

Quick answer

A 504 Gateway Timeout means a gateway or proxy did not get a reply from the main server in time. Reload later; site owners should find slow scripts or database queries and raise proxy timeout limits.

What does “504 Gateway Timeout” mean?

HTTP 504 means the upstream server took too long to respond.

What causes it?

  • Slow database queries or scripts
  • Server overload
  • Low proxy timeout settings
  • Network problems between servers

Steps to try

Stop when the issue is resolved.

  1. Reload after a minute.
  2. Try another network or browser.
  3. Site owners: check slow query and error logs.
  4. Site owners: increase proxy_read_timeout (Nginx) or similar settings.
  5. Site owners: optimise heavy pages and add caching.

Need more support? Check the official help: MDN Web Docs: HTTP response status codes

FAQs

Can my router cause a 504?

Rarely. Restarting it is a quick test.

Does Cloudflare show 504?

Yes. It means your origin server did not respond in time.