What does 502 Bad Gateway mean
Sometimes after entering information into the address bar of the browser, the following error message appears on the monitor:
How serious is error 502 Bad Gateway? What does it mean, and what consequences does it entail? Does it indicate problems with the user's computer? What actions to take to eliminate this failure?
What does the 502 Bad Gateway error mean?
The literal translation of the error message that the browser displays is the “bad gateway.” The second line indicates the name of this gateway - nginx. In fact, the role of the gateway in this situation is assumed by a separate web server that stores special software that allows it to perform the functions of a gateway - the so-called frontend, which helps to gain access to the high-powered capacity of the main server. At the same time, nginx is a universal server for UNIX-based systems, therefore it can be used as a mail or proxy server.
So, the user sent a request (entered the address of the Internet site), but the browser reported that access to the Internet resource is impossible due to the “bad gateway”.To be more precise, nginx received a request, after which he sent it to the server, where data arrays belonging to the site are stored, but did not get back the correct answer. Thus, 502 Bad Gateway indicates problems in the primary server. Why did the work of the latter suddenly fail and how to fix it?
Causes of error
Any server is a device designed for a certain load. For example, it can store tens of thousands of pages of a single Internet site, but only 1000 users can access them simultaneously. Accordingly, working in a load mode that exceeds the maximum, the server is unable to process too many Internet requests, which forces it to refuse to provide information. However, the path of the request that the user gives can run through several servers: a corporate proxy server, a DNS server and, finally, a hosting server. As soon as one of them ceases to cope with the load, error 502 Bad Gateway appears on the monitor screen.
In accordance with the above, the reasons for the appearance of the 502nd error may be different, but all of them, one way or another,are associated with exceeding the load on the server:
- too many requests from users who are simultaneously trying to access the site;
- DDOS-attack on the server by competitors (deliberate creation of a large number of requests in order to "overload" the power of the provider and force it to close access to the Internet site);
- the server has a configuration that does not correspond to software and / or hardware solutions that the user accesses it (incompatibility);
- large files are uploaded to the server, which takes all of its free capacity.
How to fix error 502?
Regardless of what the problem means, or what the reason for its occurrence, when faced with error 502 Bad Gateway, you must follow the following algorithm of actions:
- Check for internet access. This can be done in several ways, but the most reliable will be an attempt to enter any other site. If its viewing is possible, it means that there is access to the network, and an error message appears due to incorrect operation of the main server.
- Delete cookies - temporary files stored by the browser for faster access to the materials of a particular website (for example, passwords).In principle, to solve a problem, it is sometimes sufficient to delete cookies that relate directly to a specific web resource (that produces an error 502). However, let's not forget that regular cleaning of all cookies is a must-have procedure for safe “surfing” on the net.
- If the resource is still unavailable after the actions performed, the user can only wait for the provider, hosting owner or site owner to take care of resolving the problem: repulse the DDOS attack, somehow reduce the load on their servers, correct the configuration of their Internet capabilities and etc. Finally, you can just try to access the web resource a little later. Perhaps after a while there will be fewer people willing to go to the Internet site, and your request will be processed correctly.
To the user's note! To clear cookies in your browser, you must do the following:
- for Internet Explorer 7+: Tools - Internet Options - “Delete” - “Delete Cookies”;
- for Mozilla Firefox: Tools - Settings - Cookies - “Clear cookies”;
- for Opera: Tools - Delete personal data - Details;
- forGoogleChrome: Settings - Show advanced settings - Personal data (Content settings) - filescookie.
How to choose the toilet
What is dangerous for a person working on the night shift?
How to say compliments
Wife of 60-year-old Alec Baldwin would like a fifth child
Stylish ceiling chandeliers
How to bake game in the oven with potatoes