Cloudflare and Pythonanywhere 522 response

It started recently, before everything worked smoothly. It’s been no significant traffic growth to overload servers. Cloudflare logs show all good. But! Website doesn’t load properly, sometimes it needs to reload page to get content, something is dropping connection to the origin in the middle of requests and I can see broken pipe errors on my server logs. Page don’t load completely within timeout. I checked origin server logs, there were all responds given in in 0.02 sec maximum, but on client’s the page doesn’t load at all – throws 522 erorr Cloudflare page, or partially – images and other static files don’t load and 522 response shown on page source for some src links. I reached out origin server support, they said 522 is a Cloudflare specific. The origin is Pythonanywhere. How can I get more detail on Cloudflare side/logs to address then to origin server support? What Claudflare settings/features should I revise or turn off.

Hi @kirill.olkhovskii
The 522 error is very common, and almost always caused by the origin server rate-limiting or blocking requests from Cloudflare IPs.
Please find more information here: