Random 522 timeout using Cloudflare (works fine with AWS CloudFront)
I'm working at a web service and since a few months ago we started with a new environment, self hosted, with Cloudflare as DNS and CDN.
But I'm receiving random 522 timeout errors.
My architecture is:
User <> Cloudflare <> ISP <> Firewall <> nginx <> OriginServer
Summary:
. Response time usually 50 - 200ms (always < 1000ms)
. Traffic is ~600k req/month and ~9GB/month
. Cloudflare free tier, proxied DNS + CF SSL
After several investigations where 522 could be originated, we narrowed down to "Cloudflare <> ISP" connection.
Last monday night I've switched to AWS Cloudfront, and no issue happened the following tuesday.
At tuesday night I've switched back to Cloudflare, and the first time I've tried to access the service I already got an 522 error.
I was talking to my ISP on how to solve this, they suggested to talk to Cloudflare support.
Since I'm still at free tier, there is no e-mail support.
Can someone please help me?

1 Reply
im having a similar issue and i havent been able to figure out yet. my web page went down with 522 error on sept 4th. ive, at this point, done everything i know.