How To Fix The Error 504 Gateway Timeout in WordPress Site?

504 gateway timeout wordpress error

 504 gateway timeout error on WordPress

Table Of Content

Among the many status codes that you can receive when a server is unable to respond to the request that you are making, is the 504 Gateway Timeout error. In this case, proxy server doesn’t receive a timely response from the backend server.

Surely you have encountered it sometime, although it is true that it is less frequent than other server-side errors that we have already talked about,  such as 500 status error codes, 503 service unavailable error in WordPress, 405 Method Not Allowed Error, Error 404 Page Not Found, WordPress File And Folder Permissions Error, Are You Sure You Want to Do This Logout Error and many more.

In this post you will learn about what does http error 504 gateway timeout mean and how to resolve error 504 gateway timeout in WordPress site.

What is the error 504 Gateway Timeout ?

Whenever you visit a website (or try to visit it), your browser generates a request and sends it to the server that hosts that website. The request is handled and the server returns an HTTP status code that will only be shown to you if something has gone wrong. If everything goes well, you will simply receive the content you expected.

504 gateway timeout

More specifically, error 504 is an HTTP status code indicating that a server has not received the response it expected from another server within a reasonable period of time when trying to access a website or complete another request through the browser.

In other words, the error code 504 usually indicates that a server with which it is necessary to communicate to view a website is not responding fast enough. The sender of the error message is the server that, in the communication chain, does not receive a response within the stipulated period and, therefore, is not capable of fulfilling its role.

The server that causes the http 504 status code does not have to be the one that directly hosts the web, but it can be a gateway or proxy server that is on the way.

What is a gateway or proxy server?

In its primary form, accessing a website implies that your browser establishes communication with the server on which it is hosted. So far so good, right?

The case is that in web or network matters things are never so simple and there are always exceptions. One of them is a proxy server. These types of servers are machines that mediate all or part of the communications you make against other servers.

What is the purpose of this type of server? Well, there can be several. We name a few to give you an idea:

  • A proxy can act as a “load balancer”, receiving your request and directing it to the least busy server in a group. This way, the chosen server will respond faster than the one with more workload.
  • They can also act as firewalls, restricting network traffic. Have you ever had problems at work entering a page? If so, the fault is surely a proxy that put your company there to make you” work more.”
  • The proxies also allow the Internet to navigate through them, thus making your connection is a bit more private. These are the so-called ” anonymous proxies ” (but watch out and don’t believe that they are anonymous).
  • Finally, some configurations within the same server may need a proxy configuration with itself. It is rare, but in configurations of some programming languages, such as PHP, it may be necessary.

As you can see there are many reasons why a proxy can mediate a connection. In essence, you may think that the server that hosts the web you want to see is simply the last link in a long chain in charge of processing the HTTP request that you have sent.

Therefore, the proxy is a node that is part of a much larger network and that connects and routes communications between various actors: client, server and other necessary nodes. When any of these actors does not respond in a suitable time, the proxy server gives the connection for failed and returns you the error 504 to let you know that “the fault is of another server that has not responded” is due to slowness, configuration problems or any of the other causes that we’ll tell you about in this article.

Messages for HTTP 504 code

It varies a bit depending on the website and the type of proxy that launched it, as administrators can customize the look of the error 504 page. This is why some websites have custom messages for HTTP status codes.

What is 504 gateway timeout error

The error 504 appears instead of the website you want to access, but the error page may also contain the header or footer of the site and a personalized message tells you what’s going on. On the other hand, a 504 error can also show up as a simple white screen with a very large “504” at the top of the browser.

Some of the most common messages for HTTP 504 code are:

  • HTTP Error 504 – Gateway Timeout
  • Gateway Timeout (504)
  • 504 Error
  • “504 Gateway Timeout NGINX”
  • “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 in wordpress
  • 504 Gateway Timeout
  • HTTP 504
  • Timeout error 504
  • Bad gateway error

What causes the http error 504 gateway timeout in WordPress site?

As we said before, error 504 is a connection error between servers. Therefore, you can forget that it is a problem with your connection or with your device. Most of the time, error 504 is caused by another server taking it too easy, down, or not working properly.

As with most HTTP response codes that indicate an error like this, it can be difficult to establish the exact cause of the 504 Gateway Timeout. After all, communication between client, web server, and even third-party services is a complex issue.

In general terms, the most common is that the server you are trying to communicate with is receiving a large number of requests and is currently overrun or down. It cannot function properly and the browser provides the user with the 504 Gateway Timeout status code. However, it is also possible that there are network connectivity problems or that it is even the fault of a third-party plugin.

What a mess, huh! Don’t worry, now we are going to see solutions to all these possible causes. In most situations, it is rare that the 504 error comes from the client-side, but there are some things you can try:

504 Gateway Timeout Error SEO Impact

Unlike 503 errors, which are used for WordPress maintenance mode and tell Google to check back at a later time, a 504 error can have a negative impact on SEO if not fixed right away. If your site is only down for say 10 minutes and it’s being crawled consistently a lot of times the crawler will simply get the page delivered from cache. Or Google might not even have a chance to re-crawl it before it’s back up. In this scenario, you’re completely fine.

However, if the site is down for an extended period of time, say 6+ hours, then Google might see the 504 error as a site-level issue that needs to be addressed. This could impact your rankings. If you’re worried about repeat 504 errors you should figure out why they are happening to begin with. Some of the solutions below can help.

Fixing HTTP status code 504 if you are a visitor

It is likely that the error 504 has nothing to do with you, so the normal thing is that you do not solve anything.

  • The first thing is to reload the page: press F5 or the Refresh button on your browser. If error 504 was a temporary failure, simply updating the page may allow you to enter.

Caution: Do not reload the page if the error appears just after making a payment. You may duplicate the transaction.

  1. To make sure there is no problem with your local network, check if the website is giving trouble to everyone or just you. You can do it with different tools, but the best known are  Pingdom Tools,  Down For Everyone Or Just Me and  Is It Down Right Now. Enter the domain you are trying to access and check the result. If the web is down, there won’t be much else you can do except waiting.
  2. Wait a while and try again. If the error 504 is really being caused by a network failure of the website or a server with which it communicates, chances are that all visits are experiencing the same error as you. It is likely that the person in charge of the web is already aware and is working to solve it.
  3. If the web is only giving you problems, it is that the failure is on your side (this is very, very rare). To check if the error 504 has something to do with your browser, try to clear the cache, access in incognito mode, or directly access from another browser. If you can’t either, perhaps your computer or network equipment is having a temporary problem of some kind: try accessing from another computer, network connection or (the easiest) from your mobile phone.

For users with technical knowledge: If nothing works and you’re about to jump out the window, make one last try. Check if it is a DNS server failure: you can use Google’s public DNS.

  • If the fault is not on your side (which is normal) and access is in a hurry, you can contact the webmaster to report the error 504 Gateway Timeout. Most websites have a profile on one or more social networks from which they interact with their followers. The most important websites also usually have an email or phone number through which you can contact them.

How to fix the HTTP 504 status code if you are the web administrator?

To summarise, Go throught he following basic steps to fix 504 gateway timeout error in wordpress.

  1. Look for server connectivity issues.
  2. Check for any DNS changes.
  3. Sift through your logs.
  4. Fix faulty firewall configurations.
  5. Comb through your website’s code to find bugs.

First of all, as always, remember that it is better to be cautious than to regret later. It is vital that you make a complete backup of your installation, database, etc., before making any changes to the system.

  1. First of all, check that the server you are hosted on is working normally. Sometimes, if the traffic increases a lot it is possible that it will result in a 504 error (although the most common would be a 503 error, the truth) if the service that manages the final response is overloaded and takes time to respond. It is better to rule out this possible reason as soon as possible: you can use Pingdom Tools to check the response of your hosting.
  2. The 504 status code may also have been caused by recent changes or updates on your website. The easiest way is to check the bug report. WordPress users can add these lines to the wp-config.php file so that they can see all the results in debug.log (in wp-contents):
1

2

3

define( ‘WP_DEBUG’, true );

define( ‘WP_DEBUG_LOG’, true );

define( ‘WP_DEBUG_DISPLAY’, false );

 

  • The 504 Gateway Timeout error in WordPress can also be caused by errors in the database. Install WP-DBManager and use the “Repair DB” and “Optimize DB” functions, to see if it works for you. You also need to check that the .htaccess file is free of errors, especially if you have recently reinstalled WordPress.
  • If you’re getting a 504 status code in WordPress, it doesn’t hurt to check plugins (especially caching ones). Turn them all off temporarily and see if you still see the error. If not, you will know that a plugin was to blame. Turn them all back on and start turning them off one by one until you identify which one is causing the error.
  • Are you using a CDN service? In the case of a website security company, the error 504 will appear customized: “504 Gateway Timeout/”. Deactivate the CDN, wait a few hours for the DNS to propagate and the error 504 should be gone. You can also contact the website security company’s support to review what has happened. It would also not hurt to try using the host’s file to access your website and thus rule out problems on the security company side.
  • Finally, if nothing works, it is best to contact your hosting provider. It is possible that error 504 is due to a problem that they can solve.

 fix http error 504 gateway timeout wordpress

Conclusion

There is a multitude of different ways to troubleshoot and fix 504 gateway timeout errors on your WordPress site. The good (and the bad) of the error 504 is that it usually originates from an intermediary server, so as a user you cannot do much to fix it. In general, you can wait a bit and the matter will be resolved without your intervention. However, if you are in a hurry, if you are using an online application and you cannot continue working in the meantime or if the affected website is your own and you are losing traffic, you may want to apply the possible solutions that we have suggested in this post.

WordPress HTTP Image Upload Error – How To Fix It?

“This Account Has Been Suspended” – WordPress Down[Fix]

Leave a Reply

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