How to Fix a 504 Gateway Timeout Error (2024)

The 504 Gateway Timeout error is an HTTP status code that means that one server didn't receive a timely response from another server that it was accessing while attempting to load the web page or fill another request by the browser. In other words, 504 errors usually indicate that a different computer, one that the website you're getting the message on doesn't control but relies on, isn't communicating with it quickly enough.

Are You the Web Manager? See the Fixing 504 Errors on Your Own Site section further down the page for some things to consider on your end.

Causes of 504 Gateway Timeout Errors

Most of the time, a 504 Gateway Timeout error means that whatever other server is taking so long that it's "timing out," is probably down or not working properly.

Since this error is usually a network error between servers on the internet or an issue with an actual server, the problem probably isn't with your computer, device, or internet connection.

That said, there are a few things you can try, just in case:

How to Fix the 504 Gateway Timeout Error

  1. Retry the web page by selecting the refresh/reload button, pressing F5, or trying the URL from the address bar again.

    Even though the 504 Gateway Timeout error is reporting an error outside of your control, it might only be temporary.

  2. Restart all of your network devices. Temporary problems with your modem, router, switches, or other networking hardware could be causing the 504 Gateway Timeout issue you're seeing. Just restarting these devices could help.

    While the order you turn off these devices isn't important, the order that you turn them back on is. In general, you want to turn devices on from the outside-in. If you're not sure what that means, check out the link at the beginning of this step for a complete tutorial.

  3. Check the proxy server settings in your browser or application and make sure they're correct. Incorrect proxy settings can cause 504 errors.

    Most computers don't have proxy settings at all, so if yours are empty, just skip this step.

  4. Change your DNS servers, especially if all the devices on your network are getting the same error. It's possible that the 504 Gateway Timeout error you're seeing is caused by an issue with the DNS servers you happen to be using.

    Unless you've previously changed them, the DNS servers you have configured right now are probably the ones automatically assigned by your ISP. Others are also available to choose from. See our list for options.

  5. Contact the website. Website administrators may already be working to fix the root cause of the error, assuming they're aware of it, but there's nothing wrong touching base with them.

    Most major sites have social networking accounts they use to help support their services, and some have telephone numbers and email addresses.

  6. Contact your internet service provider. It's very likely at this point, after following all the troubleshooting above, that the 504 Gateway Timeout that you're seeing is a problem caused by a network issue that your ISP is responsible for.

    How to Talk to Tech Support
  7. Come back later. You've exhausted all your options at this point and the 504 Gateway Timeout error is either in the hands of the website or your ISP to correct. Check back with the site regularly. No doubt it'll start working again soon.

Fixing 504 Errors on Your Own Site

A lot of times this isn't your fault at all, but it's not the user's either. Start by checking that your server can properly resolve all the domains that your applications require access to.

Very heavy traffic might result in your server serving a 504 error, even though a 503 would probably be a bit more accurate.

In WordPress specifically, 504: Gateway Timeout messages are sometimes due to corrupted databases. Install WP-DBManager and then try the "Repair DB" feature, followed by "Optimize DB," and see if that helps.

Also, make sure your HTACCESS file is correct, especially if you have just reinstalled WordPress.

Finally, consider contacting your hosting company. It's possible that the 504 error that your website is returning is due to an issue on their end that they'll need to resolve.

How You Might See the 504 Error as a User

A 504 Gateway Timeout error can appear in any internet browser, on any operating system, and on any device. Individual websites can customize how they show "gateway timeout" errors, but here are the most common ways you'll see one:

  • 504 Gateway Timeout
  • HTTP 504
  • 504 ERROR
  • Gateway Timeout (504)
  • HTTP Error 504 - Gateway Timeout
  • Gateway Timeout Error

A 504 Gateway Timeout error shows up inside the internet browser window, just like normal web pages do. There might be a site's familiar headers and footers and a nice, English message on the page, or it could show up on an all-white page with a big 504 at the top. It's all the same message, regardless of how the website happens to show it.

More Ways You Might See a 504 Error in Windows

A Gateway Timeout error, when received in Windows Update, generates a 0x80244023 error code or the message WU_E_PT_HTTP_STATUS_GATEWAY_TIMEOUT.

In Windows-based programs that inherently access the internet, a 504 error might show up in a small dialog box or window with the HTTP_STATUS_GATEWAY_TIMEOUT error and/or with a The request was timed out waiting for a gateway message.

A less common 504 error is Gateway Time-out: The proxy server did not receive a timely response from the upstream server, but the troubleshooting (above) remains the same.

Other Errors Like the 504 Gateway Timeout

A number of error messages are similar to the 504 Gateway Timeout error because they all occur on the server side. A few include the 500 Internal Server Error, the 502 Bad Gateway error, and the 503 Service Unavailable error, among a few others.

There are also HTTP status codes that aren't server-side, but instead client-side, like the commonly seen 404 Not Found error. Several others exist as well, all of which you can see in ourHTTP Status Code Errors page.

FAQ

  • How do I fix Error 504 on an Android device?

    You can try a few other things if you see Error 504 on an Android phone or tablet. If you're using cellular data, try switching to Wi-Fi, and vice-versa. Otherwise, just like on a desktop or laptop, you'll likely just have to wait for the site admins to fix the issue.

  • What does "Error 503: first byte timeout" mean?

    The 503 group of errors is similar to the 504, but this one specifically refers to information taking too long to travel between the server and the user. The default "time limit" before this error appears is 15 seconds. To resolve it, try logging out and back in to the site you're on (if applicable), restarting your browser and computer, and checking for updates to browser extensions you may be running, like Java.

Was this page helpful?

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

Tell us why!

How to Fix a 504 Gateway Timeout Error (2024)

FAQs

How to Fix a 504 Gateway Timeout Error? ›

A 504 Gateway Timeout error indicates that the web server is waiting too long to respond from another server and “timing out.” There can be many reasons for this timeout: the other server is not functioning properly, overloaded, or down. The other server need not always be external (e.g. CDN, API gateway).

Is 504 gateway timeout my fault? ›

A 504 Gateway Timeout error indicates that the web server is waiting too long to respond from another server and “timing out.” There can be many reasons for this timeout: the other server is not functioning properly, overloaded, or down. The other server need not always be external (e.g. CDN, API gateway).

Why do 504 errors occur? ›

A 504 Gateway Timeout Error means your web server didn't receive a timely response from another server upstream when it attempted to load one of your web pages. Put simply, your web servers aren't communicating with each other fast enough.

What is 504 gateway timeout limit? ›

If the router does not respond to the client within 50 seconds, then the client will timeout and close the connection with the router. The client will get the response code of 504 . This will cause the NGINX to set a status code of 499 indicating the client closed the connection.

Is 504 error client side or server side? ›

The 504 error usually occurs on the server side, but client-side problems can sometimes also trigger this error. Here are some of the common causes: Timeout from upstream servers. Server overload.

What is a bad gateway error? ›

A 502 bad gateway error is an HTTP status code that indicates a communication error between two web servers. You can receive this error when visiting a website that gets an invalid response from its host server or experiences other issues, such as server overloads, network problems, and configuration issues.

What is error code 504 API gateway? ›

Short description. If an integration request takes longer than your API Gateway REST API maximum integration timeout parameter, API Gateway returns an HTTP 504 status code. To troubleshoot 504 timeout errors from API Gateway, first identify and verify the source of the error in your Amazon CloudWatch execution logs.

What does timeout error mean? ›

The error connection timed out means that your browser could not establish a connection to the website's server in time. The problem may be your internet connection, website server, browser, or firewall settings. Generally, a browser needs about 30 seconds to reach a website's server.

What is the difference between request timeout and gateway timeout? ›

The 504 Gateway Timeout status code indicates that the server acting as a gateway or proxy could not receive a response from an upstream server within a specified time. On the other hand, the 408 Request Timeout status code indicates that the client did not send a complete request to the server within a specified time.

What is the error code for timeout? ›

The 408 Request Timeout error is an HTTP status code that means the request you sent to the website server—e.g., a request to load a web page—took longer than the website's server was prepared to wait. In other words, your connection with the website "timed out."

What is a 504 gateway timeout 10 seconds? ›

504 Gateway Timeout means that the ALB couldn't reach the backend, this is also quoted here: "The load balancer failed to establish a connection to the target before the connection timeout expired (10 seconds)." Raising the timeout (which is an idle connection timeout) has no effect.

What is a 504 gateway timeout 60 seconds? ›

When a load balancer's connection remains idle for 60 seconds, it times out and responds with a 504 Gateway Timeout error. If your application requires longer than 60 seconds to respond, you can increase the load balancer's timeout settings in its Settings tab.

How to avoid 504 gateway timeout Java? ›

How to Fix the 504 Gateway Timeout Error
  1. Refresh the Page. You can resolve the 504 issue by reloading the page. ...
  2. Check Other Websites. ...
  3. Clear Browser Cache. ...
  4. Restart Your Computer and Network Devices. ...
  5. Flush DNS. ...
  6. Check Plugins and Themes. ...
  7. Disable Your Firewall. ...
  8. Check Error Log.
Mar 13, 2024

How to fix 504 gateway timeout error in PHP? ›

504 Gateway Timeout: What it is and How to Fix it
  1. Refresh the Page.
  2. Check Proxy Settings.
  3. Restart Router.
  4. Contact Website Admin.
  5. Check Resource Usage.
  6. Change PHP Execution Time.
  7. Configure DNS Settings.
  8. Check the Error Log.
Jun 28, 2023

How do I know if my website is server-side or client-side? ›

An easy way to determine if a site is using SSR is to view the page source. If the HTML code is complete with all the content, including the main body, images, text, and so on, the site is likely using SSR. On the other hand, if the HTML code is bare-bones, then it requires JavaScript to render the content.

What is error code 503 and 504? ›

HTTP 503: This error indicates that one or more cluster nodes don't have enough capacity to handle the request. For more information, see How do I resolve an HTTP 503 Service Unavailable error in Amazon OpenSearch Service? HTTP 504: This error happens when a request fails to complete within the idle timeout period.

Can timeout cause 502 error? ›

Determine if the 502 Bad Gateway error occurs after 55 seconds, which is the default timeout period set on the Message Processor. If you see that the error occurred after 55 seconds, this tells you that a timeout was the likely cause of the problem.

What is the difference between 502 and 504 timeout? ›

These two common HTTP status codes sound similar but their meanings are different. A 502 bad gateway means that the server acting as the gateway received an invalid response from the main server. A 504 gateway timeout means that the server acting as the gateway didn't receive a response at all from the main server.

References

Top Articles
Latest Posts
Article information

Author: Jerrold Considine

Last Updated:

Views: 5960

Rating: 4.8 / 5 (78 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Jerrold Considine

Birthday: 1993-11-03

Address: Suite 447 3463 Marybelle Circles, New Marlin, AL 20765

Phone: +5816749283868

Job: Sales Executive

Hobby: Air sports, Sand art, Electronics, LARPing, Baseball, Book restoration, Puzzles

Introduction: My name is Jerrold Considine, I am a combative, cheerful, encouraging, happy, enthusiastic, funny, kind person who loves writing and wants to share my knowledge and understanding with you.