Cloudflare: Error 522: Connection timed out
Last verified
Error 522: Connection timed outWhat it means
522 means Cloudflare could not complete a TCP connection to the origin in time. Cloudflare documents the thresholds: no SYN+ACK within 19 seconds after sending a SYN, or, once connected, no acknowledgment of its request within 90 seconds. Unlike 521, nothing refused the connection; the packets went unanswered.
For visitors and automation, 522 is a site-side outage or overload. Your request did not cause it unless your traffic is part of what overloads the origin.
For the site owner, Cloudflare says the most common cause is the hosting provider blocking or rate-limiting Cloudflare's IP ranges. Other causes are an overloaded or offline origin dropping requests, disabled keepalives, an origin IP in Cloudflare DNS that no longer matches the server, and packet loss at the origin.
What it looks like
HTTP/1.1 522
Server: cloudflare
Error 522 ... Connection timed out ... Ray ID: 8a1b2c3d4e5f6789Why it happens
- The host or firewall silently drops or rate-limits traffic from Cloudflare IPs.
- The origin is overloaded or offline.
- The A/AAAA record in Cloudflare DNS points to an old IP.
- Keepalives are disabled at the origin.
- On Workers, a Worker on a Custom Domain fetching its own hostname (Cloudflare documents this as a 522 cause).
How to fix it
- Visitors and automation: retry later with backoff and reduce concurrency.
- Site owners: confirm with the host that all Cloudflare IP ranges are allowed and not rate-limited.
- Verify the origin IP in Cloudflare DNS matches the current server.
- Check origin load and enable keepalives.
- If unresolved, collect an MTR or traceroute from the origin to a Cloudflare IP before contacting support.
How to stop it recurring
Site owners: allowlist Cloudflare ranges explicitly, monitor origin capacity, and update DNS records whenever the origin moves. Integrators: spread large jobs over time so you are not part of the load spike.
Official documentation: developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-522. See all Cloudflare error messages.
Related errors
Definitions
- CAPTCHACAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is a challenge-response m
- Cloudflare Bot ManagementCloudflare Bot Management is the set of Cloudflare features (Bot Fight Mode, Super Bot Fight Mode and the Ente
- Cloudflare TurnstileCloudflare Turnstile is Cloudflare's free CAPTCHA replacement: a widget that runs invisible browser checks, is
- User AgentA user agent is a string that browsers send with every HTTP request identifying the browser type, version, and
- Rate LimitingRate limiting is a technique that controls the number of requests a client can make to a server within a given
Quick answers
What does "Error 522: Connection timed out" mean in Cloudflare?
522 means Cloudflare could not complete a TCP connection to the origin in time. Cloudflare documents the thresholds: no SYN+ACK within 19 seconds after sending a SYN, or, once connected, no acknowledgment of its request within 90 seconds. Unlike 521, nothing refused the connection; the packets went unanswered. For visitors and automation, 522 is a site-side outage or overload.
How do I fix "Error 522: Connection timed out"?
1. Visitors and automation: retry later with backoff and reduce concurrency. 2. Site owners: confirm with the host that all Cloudflare IP ranges are allowed and not rate-limited. 3. Verify the origin IP in Cloudflare DNS matches the current server. 4. Check origin load and enable keepalives. 5. If unresolved, collect an MTR or traceroute from the origin to a Cloudflare IP before contacting support.
Retries and timeouts without writing the loop
Autonoly's HTTP Request node and browser steps have per-node retries, timeouts and continue-on-fail, so a transient 429 or 503 can back off instead of failing the run. It has no proxies or IP rotation: if a site blocks automated traffic, that block applies to Autonoly too.
Also see Error handling in workflows.