Whenever you visit a website, your browser sends a request to the web server hosting the site. The server then processes this request and sends back the requested resources.
The 504 error typically results from a timeout between servers, so it's unlikely to be caused by your device or internet connection. The delay might be due to the other server being malfunctioning, overloaded, or down.
The 504 Gateway Timeout error is most commonly caused by
- Connectivity issues: General network equipment problems can cause temporary connectivity disruptions, affecting communication across various web browsers, devices, and websites.
- Proxy server issues: Problems with proxy servers can interrupt the communication pathway between your server and the upstream server, potentially leading to timeouts.
- Firewall issues: Firewalls, particularly those with DDoS protection systems, might mistakenly block requests due to faulty configurations or restrictions on certain ISPs or content delivery networks like Cloudflare.
- DNS issues and unresolvable domains: DNS servers may fail to resolve the domain name to the correct IP address, which could be caused by incorrect DNS configurations, outdated DNS caches, or recent IP address changes.
- Server connectivity issues: Broader connectivity issues between servers, often due to network or hardware problems, can lead to a 504 error.
- Upstream server problems: If the upstream server is down or unresponsive, it can directly result in a 504 error.
- Web server overload: An overwhelmed web server, whether due to a high volume of requests or resource depletion, may slow down or stop responding entirely, causing timeouts.
- Limited PHP workers: Websites with too few PHP workers may struggle to process multiple simultaneous requests, leading to delays and timeouts.
Variations for 504 Gateway Timeout error
The 504 Gateway Timeout error can appear in various forms depending on the web browser, server setup, and operating system.
Here are some common variations you might encounter:
- 504 Gateway Timeout: The standard 504 error message.
- HTTP 504 Error: Indicates it's an HTTP status code.
- Server Error – 504: Highlights that the problem originates from the server.
- Gateway Timeout Error: Clearly points to a timeout at the server gateway.
- 504 Gateway Timeout NGINX / NGINX 504 - Gateway Timeout: Specific to NGINX servers, signaling a gateway timeout.
- Error 504 / HTTP Error 504 / HTTP Error 504: Gateway Timeout — Various ways of expressing the error, focusing on the HTTP request failure.
- This page isn’t working - Domain took too long to respond / 504 Gateway Time-out - The server didn’t respond in time: A user-friendly explanation of a delay in server response.
- The page request was canceled because it took too long to complete: Indicates a timeout in processing the page request.
- Site visitors: There was an issue serving your request, please try again in a few minutes: Advises visitors to wait and try accessing the page later due to a delay.
- Site Owners: There was a gateway timeout. You should visit your error log for more information: Suggests website owners check the error log for more details.
Each of these variations points to a common issue: a delay in server response preventing the successful loading of a web page.
Fixing 504 Gateway Timeout error
Although server-side issues are usually the primary cause of 504 errors, they can also be triggered by client-side problems or incorrect configurations. Therefore, our troubleshooting guide addresses both possibilities.
These solutions are broadly applicable to different types of websites, with specific steps provided for WordPress platforms as well.
With that said, let's begin by exploring client-side solutions.
Step 1: Refresh the webpage
The 504 Gateway Timeout error is often temporary. Simply refreshing the page can usually fix the problem. On Windows, press F5 or CTRL + F5. On Mac, use CMD + R.
Step 2: Clear browser cache
Corrupted cookies and an outdated cache in your browser can sometimes cause the error, thus it's important to determine whether your browser is the source of the problem by clearing its data history.
To clear browser data in Chrome, follow these steps:
- Open Chrome on your computer.
- Click on the three dots at the top right corner, then select Delete browsing data.
- Choose a time range, like Last hour or All time.
- Select Cookies and other site data and Cached images and files.
- Click Delete data.
Step 3: Try another browser
You could try a different browser to make sure there are no browser related issues. If you’re using Google Chrome, for example, try using Microsoft Edge.
Step 4: Flush DNS cache
Another frequent cause of a 504 Gateway Timeout error is DNS-related issues, such as incorrect IP addresses or unresponsive DNS servers.
In such cases, flushing your DNS cache might resolve the problem. Use this guide to flush the DNS cache. Also, if you recently pointed your domain, it might take up to 24 hours for DNS changes to propagate
Step 5: Check the proxy server settings
A proxy server acts as an intermediary between your device and the internet, providing privacy benefits such as masking your device’s location or encrypting web requests. While issues with proxy settings can disrupt communication with web servers, such cases are rare.
To check your computer’s proxy settings, follow these steps:
Windows 11
- Navigate to Settings → Network & Internet → Proxy.
- You'll find options like Automatically detect settings and Use a proxy server.
- If Use a proxy server is enabled, ensure that the address and port details are correctly configured for your network.
- Alternatively, you can disable this option and attempt to access the website again.
macOS Sonoma
- Click the Apple icon and choose System Settings → Network.
- Next to your network service, click Details.
- Go to the Proxies tab and turn off all proxy options by toggling off each proxy-related setting.
Note:
Keep in mind that modifying your network settings can affect your overall internet access, potentially leading to new issues. Be cautious and attentive when making any adjustments to these settings.
Step 6: Check CDN setup
If you are using 10Web Cloudflare Enterprise CDN, make sure your DNS records are correctly configured to point to your server, avoiding any unintended redirects. For more details, check this guide.
Step 7: Check plugins and themes
To check if a specific plugin or theme is causing the problem, you can temporarily deactivate them.
Case 1: If you have access to WordPress Dashboard
- Head to the Plugins section of your WordPress Dashboard.
- Choose all your plugins using the checkmark.
- Choose Deactivate from the dropdown menu of Bulk Actions.
- Click Apply.
- If the issue is solved, enable your plugins back one by one to find the exact plugin causing the issue.
Case 2: If you don’t have access to WordPress Dashboard
- Use SFTP to connect to your website files
- Double click on the web > wp-live folder to locate the plugins folder.
- Right-click on the folder and rename it.
- Try to access your website. If the error is resolved, it indicates that one or more of your active plugins are either corrupted or outdated.
- Rename the folder back to plugins and reactivate plugins one by one, reloading the site after each activation. When the error reappears, you’ve found the problematic plugin.
Step 8: Check PHP logs
Review your website error logs to identify the details of the issue.
- On 10Web Dashboard, head to Hosting Services > Logs.
- Use the drop-down menu at the top of the page to choose PHP-FPM.Log.
- Review the logs for any PHP Warning or PHP Notice errors.
- Locate the problematic plugin by following the path indicated by the error messages: wp-content/plugins/[plugin name].
- From the Plugins section, use the Deactivate option to turn off the plugin. This won’t delete your data.
Step 9: Restart the PHP
This action can refresh your server connections and potentially fix the error.
- Accessing 10Web Dashboard > Manage section of the website.
- Navigate to Hosting Services > Tools.
- Select Restart PHP to restart the PHP engine.
Step 10: Change execution time
To change the limitations of your PHP configuration:
- Log in to your 10Web dashboard.
- Click on the website where you want to make the change.
- Click on Hosting Services > Tools.
- Navigate to the bottom of the page and click on Advanced Settings.
- To change the limit, click on the drop down arrow next to the configuration and choose to double or triple the limit.
- Click Save to apply the new limitation.
If you’ve tried all the recommended solutions and are still experiencing a 504 Gateway Timeout error, contact our customer support for assistance via live chat available 24/7.
Conclusion
Addressing a 504 Gateway Timeout error involves a range of diagnostic and corrective measures. From basic steps such as examining browser-related issues to more technical solutions involving server resources and configurations, we have explored various approaches to resolve 504 errors.