HTTP 522 Connection Timed Out in Cloudflare
Cloudflare — CDN, WAF, and edge network in front of your origin.
What triggers it in Cloudflare
TCP handshake with the origin timed out (>15s).
How to fix it on Cloudflare
Check origin CPU/network saturation and firewall rules; raise the origin's keep-alive.
Where you'll see it
The Cloudflare edge before your origin ever sees the request. Look at the Ray ID in the response.
Monitor 522 responses continuously
Lemwatch checks your Cloudflare endpoints as often as every 5 minutes and alerts the moment a 522 pattern appears — with the full response headers and body captured, so you can debug without waiting for the next customer report.
Same error on other platforms
522 Connection Timed Out in Cloudflare — FAQs
TCP handshake with the origin timed out (>15s).
Check origin CPU/network saturation and firewall rules; raise the origin's keep-alive.
522 on Cloudflare is usually transient — it clears once the underlying resource (function, upstream API, or cache node) recovers. If it persists more than 5 minutes across regions, treat it as a real incident and check The Cloudflare edge before your origin ever sees the request. Look at the Ray ID in the response..
Site appears down to all visitors and crawlers. Extended 522s will hurt rankings. On Cloudflare specifically, Googlebot sees the same 522 your users see, so unresolved errors get reflected in Search Console's Page indexing report within days.
Set up an HTTP monitor that pings your key Cloudflare endpoints from multiple regions every 1–5 minutes and alerts on any non-2xx response. Lemwatch does this out of the box — including capturing the full response headers and body when a 522 hits, so you can debug without waiting for the next user report.
Both are server error responses, but they mean different things: 522 Connection Timed Out indicates cloudflare could not negotiate a tcp handshake with the origin server., while 504 is a distinct condition with its own root cause. On Cloudflare, the fix path and the log signature are different — check the exact status code your Cloudflare logs return before applying a fix.