Scroll Top
19th Ave New York, NY 95822, USA


504 Gateway Timeouts are common on websites that experience high levels of traffic, but are unprepared. It basically means that your browser did not receive a response quick enough from the website you are browsing to.

Your browser goes through these steps before it builds datal;

  • Obtain an IP address
  • Open an IP socket
  • Write a HTTP data stream
  • Receive  a HTTP data stream back from the Web server in response.

If it takes too long to get any response, your browser will throw this 504 error. To avoid this there are several things the web administrator can do to reduce the load on the server;

Change to FastCGI and add a greater timeout

We documented how to add fastCGI before.  fastcgi_read_timeout should be put into a location which you’re using for processing requests to your file.
location { fastcgi_pass; … fastcgi_read_timeout 900s; # 15 minutes }

Pick a better host

The error could be caused by slow pipelines to and from the web server, or insufficient processing power on the server. If you are a large retailer you should be on a dedicated server, and ideally this comes with some burst memory to cope with larger loads. The other alternative is to use a host that is in the “cloud” like Rackspace, where your processing and bandwidth is more flexible.



Leave a comment