“502 – Bad Gateway” is an HTTP error that occurs not often, but still can be encountered when users are trying to access content from a Pull Zone. What does this error mean, and how to fix it?
Typically, such error is conditioned by the faults in communication between computers, and sometimes with the web servers supporting the web-site you are trying to access. As for the Pull Zone, usually, it is the problem in communication between the edge servers and the origin server.
Reasons
This error can occur in 3 cases:
- - Alteration of IP on the backend. This is the most common reason. It may be due to the fact that a person changed host, or web host changed the IP allocation, or a web-site developer changed the hosting package and got a different IP address. Because of all these reasons, a server won’t be able to get the data from the origin.
- - Firewall blocks the server. This is the second most widespread reason for 502 error. Some CDN companies have strict Firewall rules, which can affect your hosting, as well. For some reason, IPs can be blocked because the system assumes that there is some illegal traffic passing through. If Firewall blocks IP, users will encounter Error 502.
- - Bad Zone Provisioning is the most unusual reason. It happens when something goes wrong when the provisioning process of the Pull Zone takes place. It may be a temporary network failure, timeout, etc. This problem can be easily solved when support team members re-provision the Pull Zone.
Debugging
To find out what caused an error, you should first clear the browser cache totally. If the error keeps appearing, you can look into the other causes. What can be done to solve the issue?
- - Examine the origin server IP. Check whether it has changed. Log in to your CDN control panel, go to “Manage” and “Settings” tab. If your IP has changed, go to “Edit” screen and input the correct IP, purge cache in the Pull Zone and in the browser, and try again. The error should disappear.
- - Look at Firewall rules. If the IP is correct, but the problem still persists, you can contact the customer support. If the Firewall causes the issue, you will be given a number of IP addresses for the Firewall rule-set.
If neither of it works, don’t hesitate to contact the Customer Support of your CDN service provider and ask them to help.