Bobcares

How to fix 504 gateway timeout error in your websites

by | Sep 7, 2017

In our role as website support specialists, we help website owners resolve all sorts of errors that affect their websites. Commonly encountered errors are related to the web server and the mail server.

One such web server error that occurs in high traffic servers, is the “HTTP Error 504 Gateway Timeout” error. Today, we’ll see what causes it and how to fix 504 gateway timeout error in websites.

Click here to resolve all website errors

What causes 504 gateway timeout error

In web server setup with a proxy server such as NginX in frontend and Apache in the backend, 504 gateway errors can occur when there is a delay in response from one server to the other.

The proxy server gets request from the client via web browser. This proxy server acts as a gateway and sends request to the web server at the backend. If the web server fails to respond on time, it would give an error.

This usually happens when the web server is down or not working properly or due to network connectivity issues. Here, we’ll discuss the various reasons why ‘504 gateway timeout error’ occurs.

  1. Browser errors – When the web client (such as browser) settings are not properly configured, it can cause connectivity issues to web server.
  2. DNS issues – Incorrect DNS settings for the domain can cause domain resolution issues, which can cause timeout errors when trying to access it.
  3. Network connectivity – If the network connection between the proxy server and the web server is poor, it will cause delay in getting response for the HTTP request.
  4. Slow web server – The backend web server, say Apache, that is fulfilling the request can be too slow due to poor performance or too much traffic. This can lead to gateway errors.
  5. Firewall blocks – The web server firewall configuration may have some errors or rules, which can prevent the connection from establishing properly and giving out errors.
  6. Proxy server timeout – If the gateway or proxy server’s timeout duration is too short, there will not be adequate time for the HTTP request to be received and passed on to web client.

[ Worried about your broken websites? Get our server specialists’ assistance to fix your site from all errors. ]

How to fix 504 gateway timeout error

The 504 Gateway Timeout error means that the proxy server is not receiving a response from the webserver within the allowed time period. It is important to identify the actual cause of the error before proceeding to the solution.

First thing we confirm is whether the issue is at the client side or in the server. To check whether it is any end-client issue, we get the customer perform these steps:

  1. Try loading the website in another browser
  2. Refreshing/reloading the website or application
  3. Checking for ISP or local firewall issues
  4. Trying the URL from a different location
  5. Restarting the network devices
  6. Confirming that the proxy server settings in the browser or application are correct

If the issue is not at client side, but in the server, then we examine the web server error logs and get insight into the issue that could be causing the timeout errors.

Some of the major tasks we perform as a part of fixing the 504 gateway timeout error are:

  1. We check the DNS settings of the website and fix any resolution errors that we detect.
  2. With the help of network tools such as traceroute, we detect the network connectivity errors and try to resolve them.
  3. If the web server is under abuse or high traffic, we immediately hop in and bring it back to stable state.
  4. For slow web servers, we perform web server optimization and parameter tweaking to improve its speed.
  5. We audit the firewall blocks in the web server and ensure that unwanted blocks are not inhibiting the connections.
  6. For proxy and web servers, we verify the ‘timeout’ configuration setting and increase it to an adequate value to avoid timeout issues. But increasing the value too much can affect the server performance. In such cases, we improve the server design and other performance parameters to resolve slowness issues.

[ A single misconfiguration may break your site! Click here for a customized and error-free website to help you boost your business. ]

Bobcares helps online businesses of all sizes achieve world-class security and uptime, using tried and tested solutions. If you’d like to know how to make your websites error-free, we’d be happy to talk to you.

 

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.