522 error occurs randomly


We have 9 different server, all are same web app, one of our subdomain gets 522 connection timeout error randomly but frequently. None of other server has a problem such this. Same app responds for different domains and other domains respond quickly. KeepAlive is enabled for 5 seconds, what can be the problem?



Thank you for asking.

I am sorry to hear you are experiencing an issue with your domain(s) while using Cloudflare.

Have you tried contacting your hosting/server provider? :thinking:

If not already read, may I suggest looking into below articles due to the specified issue of 522 timeout:

How about checking if Cloudflare is allowed to connect to your new server(s), in case any firewall, or DDoS service, or settings/configuration changed? :thinking:
Kindly can you re-check if Cloudflare is allowed to connect to your origin host to as follows in the below article:

Nevertheless, Cloudflare IP addresses list can be found here:

Before moving to Cloudflare, was your Website working over HTTPS connection?
Maybe the SSL certificate expired at your hosting for your sub-domain?
May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?

Hi, thank you for your answer. I 'm the hosting / server prodiver, we have own system in DC, so this is not the case. I have already read the link you shared about 522 error, thank you. We have a firewall front of the servers, maybe sometimes it prevents the requests but it does not explain how other 8 servers work properly although they all behind the same firewall. Our ssl cert is valid and provided by Cloudflare with full mode.

I still cant figure the problem, it works sometimes and sometimes not.

Hm, interesting.

Are you using some kind of a proxy manager for a specific app/domain on that (or even other) servers, like NGINX Proxy Manager?
How about port forwarding, if so? :thinking:
Ping and MTR / Tracerout is ok with that particular server?

Hello. No proxy server, no forwarding. We have another domain for same app and it gets thousands API requests even in a minute sometimes but no problem with that. We are having the problem with the specific subdomain redirected by Cloudflare only.

So the sub-domain is :orange:?
May I ask if it’s like a.domain.com or www.a.domain.com? :thinking: