When visiting the website, all kinds of mysterious mistakes emerge one after another. The most famous one is the 404 error - the error encountered when accessing a web page that does not exist. The common error that ranks second is the 504 error gateway timeout. There are many other error codes in addition.
When encountering such errors when loading a website, it is very frustrating for both visitors and brands. Visitors are unable to get the information they need, and brands reduce exposure and alienate their audience.
The good news is that the 504 error is controllable to a certain extent. You can maintain your reputation by taking some precautions and learning how to quickly fix 504 gateway timeout issues. But first, let's clarify what exactly does the 504 error gateway timeout mean and why.
What is 504 gateway timeout?
Each time you visit any website, your server tries to communicate with the website's host server (also known as the upstream server) to get all the necessary information needed to display the content of the website.
When the host server fails to respond to request data at a fast enough speed, the request timed out and you will not be able to load the web page correctly. This is the 504 gateway timeout error.
Depending on your browser and operating system, you may see different versions of the 504 error:
- Google Chrome displays only HTTP ERROR 504 followed by "This site cannot be accessed".
- Applications in Windows may display HTTP_STATUS_GATEWAY_TIMEOUT or even WU_E_PT_HTTP_STATUS_GATEWAY_TIMEOUT
- Another possible prompt message is "The proxy server did not receive a response from the upstream server in time."
Unfortunately, error code 504 is not very specific in itself, and there are many reasons for it to appear, which makes the troubleshooting process a bit complicated.
Reasons for the 504 gateway timeout
Before you start fixing the 504 error gateway timeout error, you need to carefully consider all possible reasons and try to infer the real cause of this error.
The servers cannot connect to each other . The most obvious reason for the 504 error is that the website host server has failed. For example, it may be downtime due to overload, attack, or maintenance.
DNS changes . Migrating the server to a different IP address can also cause DNS changes. Since DNS spread takes some time, your website may not be available during this period. This situation should be resolved within one day.
Strict firewall . Given so much online malware, it is not a wise move to expose your website to any bot or malicious script. Setting up a firewall can prevent illegal traffic and DDoS attacks, but it may sometimes deny real visitors, showing them a 504 error gateway timeout error.
Website error . If you have been changing and updating your website code recently, you may have introduced some compatibility issues that the server cannot use.
Network issues . In most cases, the 504 error is related to the host server. However, if you are the only one who sees the error page, it may indicate that there is an unresolved issue with your internet connection.
Checking the above various reasons one by one can help you find out the real reason for the 504 gateway timeout error. With this information, you can easily find the right solution.
Server monitoring software for macOS
Continue to pay attention to the status and performance of the server. View top-level Mac apps for website administrators and administrators on Setapp.
Free Trial### How to Fix 504 Gateway Timeout Error
If you look closely at all possible causes of error code 504, the solution is likely to be obvious. Here are some of the most common fixes.
Troubleshooting the server connection . Your server may go down without your knowledge, causing a 504 error to all visitors. This could be a quick server maintenance done by your hosting company, or it could be a more serious and persistent error in the server itself. To discover this, you need Simon.
Simon is a smart application that automatically monitors the status of all servers and websites in one place. This application has a complete toolkit that helps you seamlessly control and troubleshoot Internet properties. You can set up monitoring systems, design various tests, detect any changes, find errors, and track recovery. Notifications are also instant, which means less downtime for anything you track.
Restart the network device . While this has become a rather cliché fix, restarting network hardware may be one of the best ways to fix network-related issues. Locally, start with your modem, router, and any switch. Remotely, you can restart the server or rebuild your website again.
Reconfigure your DNS . One of the most common reasons for a 504 error gateway timeout is that your website is migrating to a new server, thus changing your DNS. DNS changes can take hours or even days. Once you make sure your DNS is set up correctly, the best way is to simply wait for DNS to spread completely online.
Find errors in the server log . If your server, network device, and DNS are all OK, the problem may be more local. Log in to your server and check the server logs for any inconsistencies that may cause the 504 error gateway timeout in the server status update.
Adjust the firewall configuration . While using a firewall is a very good idea, sometimes it can give you a headache because it blocks legitimate traffic, resulting in error code 504.
Locally on your Mac, make sure to turn off the firewall in System Preferences ➙ Security & Privacy ➙ Firewall. Then navigate to the firewall settings in the server and try to deactivate it to test if the 504 gateway timeout still exists. If it disappears, try turning on the firewall settings one by one to find the faulty settings.
Make sure your proxy is set up correctly . Most Macs don't really use custom proxy settings, so this may not work for everyone. However, if you do use them, double checking them can solve the 504 issues, especially when debugging them with Proxyman.
Proxyman is the best debugging Mac application for proxy settings. You can categorize various applications that communicate with the network and all domain names you have, view HTTP/HTTPS requests, and view potential errors on your Mac, iOS simulator, or remote devices. It's indeed an easy proxy debugging.
Check your website code . Rarely see no errors in the code base. While most errors are irrelevant, some can interfere with the way the server handles various requests. First check your git commit to see if there is any server-related code added. If your web environment is difficult to interpret, try using DevUtils.
DevUtils is an extension toolkit for building and testing websites locally on your Mac. This is a great all-in-one solution for developers to have full control of the website before publishing it around the world.
Contact your hosting company. If you are not familiar with server configuration, you should try to contact your hosting provider and find out what support they can provide.
As you can see, once you know what a 504 gateway timeout is, everything is methodically trying various solutions to fix the error. What can definitely help you is to use Simon to proactively monitor your website for any errors, check proxy settings with Proxyman, and test your build before deployment with DevUtils.
Best of all, Simon, Proxyman, and DevUtils are all available to you for free with the seven-day trial of Setapp, a platform with over 220 great Mac applications for any task. Try each Setapp application for free today and quickly collect your favorite apps!
The above is the detailed content of How to fix 504 gateway timeout errors on Mac. For more information, please follow other related articles on the PHP Chinese website!

Longtime Mac users may recall a handy old shareware application for the Classic Macintosh called Stapler, which essentially helped manage projects by grouping a series of apps and documents into a single document that when opened would then launch al

Apple Intelligence is a set of AI features that Apple is rolling out in beta, and will debut to a larger set of Apple device owners in the fall. Apple Intelligence offers many features from writing and creating text and emails, to taking actions and

If you feel like you have spent a significant amount of your time updating system software on your Apple devices lately, you’re in for a treat; another round of system software updates! This time around, Apple has released MacOS Sonoma 14.6.1 alon

Apple has issued the 6th beta version of MacOS Sequoia for users enrolled in the developer beta testing program. Usually a matching public beta build arrives soon after, which in this case dev beta 6 would be versioned as public beta 4. MacOS Sequoia

Apple has released macOS Sonoma 14.6 for Mac users running the Sonoma operating system. The MacOS Sonoma 14.6 software update primarily focuses on bug fixes and security updates for most Macs, however it does include a nice new feature specifically

MacOS Sequoia beta 5 is now available for users enrolled in the developer beta testing program to download and install onto their Macs. MacOS Sequoia beta 5 carries the build of 24A5309e, and usually a new developer beta build is soon followed by a m

Apple has released the second beta of iOS 18.1, iPadOS 18.1, and MacOS Sequoia 15.1, each with support for Apple Intelligence AI features, on supported devices anyway. The release of these new beta updates is unusual in that they’re concurrent wit

You might be aware that VMWare Fusion Pro is now free to download and install, and perhaps you installed it on a Mac to test virtual machines or to play around with, and now you’ve decided you no longer need VMware on the Mac. But VMware Fusion P


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

WebStorm Mac version
Useful JavaScript development tools
