What is 502 bad gateway error
Simply put, 502 is the wrong gateway with error type code bad gateway. The web server received an invalid response while acting as a gateway or proxy server. In our spoken language, it means that the server running the website is temporarily hung up (not responding).
cause of error
1. The connection timed out and we sent a request to the server. Because the server currently has too many connections, the server cannot give a normal response, and this kind of error is generated.
2. Nginx itself is set to wait for the data delay returned by the cgi interface to be too short, and this time should be extended. As mentioned above, in many cases, it is not the problem of Nginx itself, and this operation often cannot alleviate the problem.
The solution
The best solution is of course to do it on the server, but it is not realistic for everyone, so what I can do is actually very simple, which is to refresh (but not a general refresh). The principle of refreshing: Many people may not know that there are two types of refreshing. The so-called refresh is actually to download data from the service to the local hard disk browser, and then read the data from the local hard disk and display it to the browser for us to see.
①Basic Refresh : Just click Refresh or use the F5 shortcut key.
Basic Refresh just re-fetches data from the local hard disk to the browser, and does not send a request to the server again.
Most users refresh in this way most of the time, and it has no effect when encountering a 502 error.
② Refresh from the server : If you directly click the link of the webpage you want to browse again, you will find that the page that still displayed 502 bad getway just now can be browsed normally again!
Do you understand the truth? When you click on the webpage link you want to browse, the data will be re-downloaded from the server.
The solution is to refresh from the server: the shortcut key ctrl+F5, so that the request is sent to the server again.
If the server can respond normally to you, you can see the page.
My Popular Article Recommendations
- Effect test of online cloud director switching for multi-channel live video broadcasting
- How to convert the video into a QR code, scan the code and play it directly?
- Which websites upload videos without inserting ads?
- How to generate a QR code from a video? Scan the QR code on WeChat to watch? no advertising
- Commonly used photo size comparison table, the size of the photo is right in this table
- Live Video Streaming Strategy (Push Streaming Interfaces of Major Platforms Organized)
- HTML5 video double speed playback function
- Teach you a trick: how to realize list playback of multiple videos?
- How to implement the function of playing videos in the video list on the WeChat public account
- H5 video double-speed playback function (an example of video multi-speed viewing function)
- How to configure an FTP server
- How to Upload Files Using FTP (FTP File Transfer)
- OBS Live Tool User Guide/Tool for Pushing Live Video Sources to Servers by OBS
- QQ browser hijacks the video tag to load its own advertisement (how to solve it?)