HOW TOWordpress

How to Fix The 504 Gateway Timeout Error?

“504 Gateway Timeout” have you seen this error message before? What does this meaning and how to fix this problem if you are a WordPress site owner?

The 504 Gateway Timeout error is a server related problem that happens when the upstream server doesn’t respond to the server that was attempting to load a web page.

So it’s a problem at the website itself. If you just a visitor you can try to refresh the page or try again later. But if you are the website owner you need to solve this problem as fast as possible.

How to fix the 504 Gateway Timeout Error?
How to fix the 504 Gateway Timeout Error?

How to fix the 504 Gateway Timeout Error?

Before recounting the possible fixes for this error, you should know that the 504 gateway timeout error can present itself in a number of different ways. For example, it can pop up as:

  • “504 Gateway Timeout”
  • “504 Gateway Timeout NGINX”
  • “NGINX 504 Gateway Timeout”
  • “Gateway Timeout Error”
  • “Error 504”
  • “HTTP Error 504”
  • “HTTP Error 504 – Gateway Timeout”
  • “HTTP 504”
  • “504 Error”
  • “Gateway Timeout (504)”
  • “This page isn’t working – Domain took too long to respond”
  • “504 Gateway Time-out – The server didn’t respond in time”
  • A blank white screen.

And now let’s see the solutions…

If you see a 504 gateway timeout error on your WordPress site, there are two possible reasons, the first one network connectivity issues and or problem with the server at which the site is hosted. Or it’s a client-side issue.

Reload the page

To make sure it’s not a client-side issue try to reload the page press (F5 or Ctrl + F5). It could be that the host or server is simply overloaded and the site will come right back.

Disable Proxy Settings

Proxy services can be the reason of this error from the client-side. So try to disable it and try again.

DNS Issue

DNS Issue can be a reason for this error, and it has to sides:

The first, on the server-side. If you have just migrated your WordPress site to a new host, is it important to wait for things to fully propagate, which can take up to 24 hours in some cases. This depends upon the TTL value of your DNS records.

The second is a DNS issue on the client-side. In this case, you could try flushing your local DNS cache. This is similar to clearing your browser cache.

Temporarily Disable CDN

It could also be an issue with your content delivery network (CDN). If you are using a third-party CDN provider an easy way to troubleshoot this is to simply disable your CDN temporarily.

Server Issue

server issue is the common reason in general with 504 gateway timeout errors, so check all server possible issues with your Host.

Spam, Bots, or DDoS Attack

It very well could be that your site is getting spammed by bots or is undergoing a DDoS attack. Sometimes these can result in uncached requests and could overwhelm the server resulting in 504 gateway timeout errors.

You can take a look at your server analytics and see if you can spot any patterns. You could also ask your host for this data.

Check Your Plugins and Themes

Plugins and Themes not a common reason for 504 gateway timeout error, but in some cases, slow uncached requests from a plugin can indeed result in delays as this ties up more of your PHP workers. Once you’ve reached your limit of PHP workers, the queue starts to push out older requests which could result in 504 errors.

To make sure the Plugins and Themes are the reason or not, try to deactivate all your plugins.

If this fixes the issue you’ll need to find the culprit. Start activating them one by one, reloading the site after each activation. When you see the 504 gateway timeout return, you’ve found the misbehaving plugin.

Tags

Related Articles

Leave a Reply

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

Back to top button
Close
Close