Why 502 Bad Gateway error occurs when opening a Web page

Source: Internet
Author: User
Tags http request socket domain name server browser cache

502 Bad Gateway Causes

A server (not necessarily a Web server) is a gateway or proxy to meet customer requirements, such as a Web browser or our Checkupdown robot, to access the requested URL. This server received an invalid response from an upstream server to fulfill its requirements.

Meaning

This usually does not mean that the upstream server has been shut down (no response gateway/proxy), but that the upstream server and the gateway/agent disagree with the protocol exchange data. Since the Internet protocol is fairly clear, it often means that one or two machines have been improperly or incompletely programmed.

502 HTTP Cycles of errors

Any client (such as a Web browser or our Checkupdown robot) communicates with your Web server through the following loops:

Get the IP address of the IP name of your website (your site URL's leader ' http://'). This finds (converts the intellectual property name, IP address) provided by the Domain name server (DNSS).

Open an IP socket to connect to the IP address.

Write an HTTP data stream through the socket.

Received a response from your Web server for an HTTP data stream. This data flow contains the value of the status code by the HTTP protocol. Resolves the status code and other useful information for this data flow.

This error occurs in the last step when the client above receives an HTTP status code, which admits to 502 '.

Fixed 502 Error

Generally this problem is due to poor IP communication between the backend computers that may be included on the Web server where you try to access the Web. In analyzing this problem, you should clear the browser cache completely.

If you surf the web, look at this problem for all the sites you try to access and then select

1 Your ISP has a major equipment failure/overload or

2 There is a problem with the internal Internet connection such as your firewall does not function properly.

In the first case, only your ISP can help you. In the second case, what you need to solve is to stop you from getting into the Internet.

If you receive this question only some of the sites you are trying to access are likely to be a problem, that is, one of these sites whose devices fail/overload. Contact the people at these locations.

Fixed 502 Error-Checkupdown

Use of proxy and cache additions on the network. We checkupdown robots will always try to ' drill through ' the real computer host, actually your site, but we don't have full control, our HTTP request actually ends up. If only one link of the computer processing our HTTP request is broken, then an error such as 502 can easily occur.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.