As a user, there is nothing more frustrating than the encountering 504 gateway timeout error. One fine day, you log into your site and all you get is an error page. This can be worrisome and frustrating for the site moderators and admin as well. This might be considered as a usual issue in the current internet-generation, but it may even translate to lost traffic. The sites, especially in the eCommerce industry, negative impact of the load time might even cripple some of the easy conversions.
If you are a WordPress user, then, you must be familiar to the 504 Gateway Timeout Error. Fortunately, regardless of how this may sound, dealing with the issue quite a cake-walk. The article brings forth everything that you need to know about 504 error and the ways to troubleshoot them. Read on to know more.
Before you dive into troubleshooting, you need to know the exact meaning and root cause of the problem.
What is a 504 Gateway Timeout?
Every HTTP status code beginning with the digit 5 are server-side errors. 504 gateway timeout error basically means that “The server, acting as a gateway, timed out waiting for another server to respond”. 504 gateway timeout error pops up when the browser is not able to set up a connection with the site. In layman’s word, when one server does not receive any response from another server.
504 error can impact the SEO of your site negatively. This is because the sites are crawled consistently by the Google’s crawler. In case, the site is throwing the 504 error for a long time, then, Google might see it an issue related to the website level. This would ultimately affect the ranking of your site on Google’s SEPR.
What are the Potential Reasons and Fixes of 504 Error?
Before you delve into the fixes of the problems, it is important to figure potential cause of the error. Listed below are some of the reasons due to which the server issue may fail to response and their fixes.
Overloaded Server or Host
One of the most common reasons of the bad gateway error is overloaded server or host. In such a case, the site may come back soon.
One of the easiest ways to deal with it is simply by clearing the cache. Reload the site or press Ctrl + F5. In the meanwhile, you can even check whether the problem is related to the local network. There are online tools available for the same. Clearing browser or using incognito mode for browsing may also help verify if the issue browser related.
CMS platforms use a lot of plugins and extension to boost the UX and UI of the site. WordPress is no different and sometimes the outdated plugins may cause troubles. The plugins that are related to caching in some way or the other might be the culprit.
Going through your site’s plugin is advisable in such case. The incompatibility issue arises when the plugins are not upgraded to the latest version.Disabling the plugins is the best way to debug the problem and find the real culprit. Go to public_html in the wp-content using the FTP manager. Rename the plugin folder, so that, WordPress doesn’t recognize the contents of the folder. Once this is done, startenabling the plugins one-by-one.This will help you identify the real culprit. Once you have figured out the extension that is causing the problem, you can try and fix the same. Sometimes, updating the plugin might help.
Changes and Updates in Sites
Any changes or update made in the site causes 504 gateway timeout error.
You can find out the same by adding the lines mentioned below to the wp-config.php file:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
The DNS issue is another reason for the 504 woes in WordPress sites. The DNS issue may happen from the server-side or the client-side. In the former case, you have migrated your WordPress site to a new host, then, you’ll have to wait till everything is fully propagated. This can take up to 24 hours at times depending upon the TTL value of your DNS record. In case, it’s not fully propagated, you’ll simply have to wait for the same.
While if the DNS issue is from the client-side, then, you may try by flushing your local DNS cache. For this, open up your command prompt and the enter the command: ipconfig/flushdns
If it works, a successful message will be flashed as shown in the above image.
Disable you CDN
Content Delivery Network or CDN reduces the workload of the server and loads the website faster than usual, however, it can even stumble sometimes. CDN adds another gateway between the client and the server. Hence, in some cases, it actually becomes the reason behind the reason of 504 Gateway timeout errors.
Usually, CDN providers return errors, thus, it becomes easier to figure out if this is the reason. The best way to handle it is to disable CDN temporarily.
Change proxy setting
Sometimes, the 504 error occurs when the connection is configured to use proxy setting. In such a case, disable the proxy setting of your browser.
The process of disabling the same depends on the browser. For instance, for Google Chrome, follow the steps mentioned below to disable the proxy setting.
In Google Chrome, go to Settings -> Advance -> In the System section, click on Open Proxy Settings -> Check the Automatically detect settings.
WordPress offers the ease of website development. It enables you to create your site without any coding knowledge. However, there are some downsides of the CMS platforms. It throws a lot of errors at you and 504 error is one of them. 504 gateway timeout error might seem harmless, but it can act as a silent killer for your WordPress site. Other than the above-mentioned reasons, there are certain other reasons that may be a cause of 504 error. These reasons may include Slow server, HTTP request timeout, Firewall issue, Spam/Bot attack and others. The key to efficiently troubleshooting is to identify the root cause. So, the next time when you come across such an issue, do not panic. Just try to figure out the reason and you’ll be able to handle it well.