Home » Development » What Causes 504 Gateway Timeout Error?
Screen Shot 2018 05 10 at 6.15.55 PM 582x330

What Causes 504 Gateway Timeout Error?

It’s both worrisome and frustrating when you are trying to browse a WordPress website and keep encountering errors. Some of the commonest problems you may have encountered would be 502 – bad gateway or the popular white screen of death. Let’s not forget the ever so popular, error in establishing a connection.

For a regular website, these errors may not have major repercussions. But, for news/blog and e-commerce sites, these errors can cause major loss in terms of revenue.

In this post, we will talk about 504 gateway timeout error, what causes it, and some ways to fix it. 

What is 504 error in WordPress

Before we talk about this error in detail, it’s crucial that we understand how it  gets generated in the first place. The thing is, whenever a browser is launched and a user visits a website, a request is sent back to the server on which it is hosted.

That server would then process the request and send back the requested resource along with HTTP header. HTTP header carries several HTTP status codes which tell whether or not everything is alright. But, not all the statuses are bad. A 200 status code for example means ‘Everything is Alright’.

When you talk about 500 status error codes such as (500, 502, 503, etc.) – all of them have different meanings. The codes indicate that the error was accepted but the server could not process the request.

504 – gateway timeout means ‘the server which was acting like a gateway timed out while waiting for some other server to give a response’. This error happens in cases when there are 2 servers processing a request and the first server waited for the upstream server to respond but the response was never received during a certain duration.

Variations of 504 Gateway Timeout Error

Since there are countless operating systems, web browsers, and servers, you may see several variations of 504 gateway error. But, all of those errors mean one and the same thing.

Take a look at some of the common variations you may come across –

  • 504 Gateway Timeout
  • Gateway Timeout Error
  • 504 Error
  • HTTP error 504
  • Error 504
  • HTTP 504
  • Gateway Timeout (504)
  • A blank white screen
  • “504 Gateway Time-out – server didn’t respond in time”
  • “NGINX 504 Gateway Timeout”

The most common cause of this error is when the server is not properly functioning or is down due to connectivity issues.

Screen Shot 2018 05 10 at 6.15.43 PM

Let’s take a look at some of the reasons that might be causing this error –

  1. Browser errors – Sometimes the settings of a web client (browser for example) may not be configured properly. In that case, connectivity issues may be experienced.
  2. Network connectivity – Poor network connectivity between web server and proxy may also cause delays in getting HTTP response request.
  3. DNS Issues – Improper DNS domain settings can cause domain resolution issues resulting in timeout error when trying to access a site.
  4. Firewall blocks   Sometimes the firewall configurations of the web server could have certain errors which can come in the way of connection getting established properly thus causing several errors.
  5. Slow server – Sometimes the server on the backend, like Apache for example could be too slow thus failing to fulfill the request. The reason behind this slow performance can be too much traffic. Again, this issue can cause the 504 error.
  6. Proxy Server Timeout – If the timeout duration of the proxy server is too short, HTTP requests may not get proper time to be received, processed and passed to the client.

Ways to fix 504 error

The error is indicative of the fact that the proxy server could not receive a response from web server within a specified time period. But, before you go ahead and fix the problem, it’s important to understand the cause of error first.

For that you need to know whether the issue is arising from server side or client side.

Following steps will confirm that the issue is client-end.

  1. By loading the site in other server and see if the issue is fixed
  2. By checking the local firewall and ISP issues
  3. Trying to access the URL from different location
  4. Refreshing the app/website
  5. Making sure that the proxy server settings are correct in the app/browser
  6. By turn on and off the network device

The steps above should confirm if the issue is arising at the client side. If that’s the case, check out this really helpful guide listing out ways to fix 504 gateway timeout.

However, if that’s not the cause, there might be some issue with the server-end, then you would need to check the error logs in web server. From there you can get insight into what may be causing the timeout error.

Take a look at some of the tasks you can perform to fix the the 504 error –

  1. Examine the DMS settings related to the site and see if there are any resolutions errors that need fixing.
  2. Detect network connectivity issues with network tools like traceroute and fix the.
  3. Contact the hosting service provider and they may bring the server to a stable state in case it is loaded with too many requests and is facing high traffic.
  4. Slow web servers would need parameter tweaking and server optimization in order to improve the speed.
  5. Hosting company would need to audit the firewall of their server and check if there are any unnecessary blocks that might be coming in the way of the connections.

Final Thoughts

504 timeout is a common error that users runs into every now and then. If you are a website user, there are several steps you can implement to fix the issue.

But, if the issue is not arising at your end, we recommend getting in touch with tech support of your hosting company.



About DesignsRock Editorial

Follow us on Facebook, Pinterest, or Twitter! Get latest update web design trends.

Check Also

wordpress maintenance

How To Choose The Right Cloud Computing Services Provider

Businesses today have a lot to be grateful for, thanks to cloud computing. A lot …

Leave a Reply

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