Click here to Skip to main content
15,895,538 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I am running very simple html form and host in IIS. If i run html page directly it will run in browser, but if i host in iis then run i will get error that Error 522 connection time out. How to solve this problem. Kindly help me.

What I have tried:

I search in net only, but cannot find the solution.
Posted
Updated 26-Jul-20 21:24pm

1 solution

As mentioned here: Community Tip - Fixing Error 522: Connection timed out - DNS & Network - Cloudflare Community[^]
Quote:
Background
A 522 error happens when a TCP connection to the web server could not be established. This typically happens when Cloudflare requests to the origin (your webserver) get blocked. When this happens, you’ll see “ERR_CONNECTION_TIMED_OUT”.

Quick Fix Ideas

Make sure that you’re not blocking Cloudflare IPs in .htaccess, iptables, or your firewall.

Make sure your hosting provider isn’t rate limiting or blocking IP requests from the Cloudflare IPs and ask them to whitelist the IP addresses here: https://www.cloudflare.com/ips 1.9k. If the IPs that fail are consistent each time, that indicates some of the IPs in Cloudflare’s IP ranges are either being rate-limited or blocked by a network device at your hosting provider. Because Cloudflare operates as a reverse proxy the IP address your server will see is one of a limited number of Cloudflare IPs. In that sense, many actual visitors may all come from the same IP address, which can cause firewalls or security software that is not appropriately whitelisting the Cloudflare IP ranges to block this traffic as it may see it as excessive or malicious

If you are seeing 522 errors in certain locations only, it means you likely forgot to whitelist one of our ranges that corresponds to these locations, so double check to ensure all our IPs are whitelisted appropriately.

Please reach out to your hosting provider or site administrator to confirm if there are any load problems on your infrastructure.

It may be there was a temporary problem on the path or at your origin preventing connections from completing. If they are no longer happening, here are two actions to take: a) Check with your hosting provider to see if they had any issues with packet loss or if your server was under load at the time the errors happened and b) Have your hosting provider or server administrator confirm that all Cloudflare IP ranges are fully whitelisted from any rate limits.

If your firewall is configured to DROP packets rather than refuse connections, it will cause a 521; meaning an incorrectly configured firewall can actually masquerade as a connection timeout 522 error.


More references:
Error 522: Connection timed out : Exabytes.my (Malaysia) Support Portal[^]
Error 522 (Connection timed out): How to fix the HTTP status code - IONOS[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900