Skip to content
Cloudflare error pages · error message

Cloudflare: Error 522: Connection timed out

RetryableHTTP 522Origin server errors (520-524)

Last verified

The exact message
Error 522: Connection timed out

What 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: 8a1b2c3d4e5f6789

Why 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

  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.

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

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.