Skip to content

5xx Server error · unofficial (Cloudflare)

522 Connection Timed Out

Cloudflare's connection to the origin server timed out.

What 522 means

Cloudflare tried to open a TCP connection to the origin and got no answer: the server is overloaded, unreachable or dropping Cloudflare's packets.

Common causes

  • An overloaded or offline origin.
  • A firewall silently dropping Cloudflare's IPs.
  • Wrong origin IP in the DNS settings.

How to fix it

If you're calling an API

  • Retry later; the problem is on the site's side.

If you run the server

  • Check server load, firewall rules (allow Cloudflare IPs) and that DNS points at the right origin IP.

Should you retry?

Yes, with backoff.

Example response

HTTP
HTTP/1.1 522 Connection Timed Out
Content-Type: application/problem+json

{
  "type": "about:blank",
  "title": "Connection Timed Out",
  "status": 522,
  "detail": "Cloudflare's connection to the origin server timed out."
}

Defined in: Cloudflare (non-standard). 522 is a server error: the problem is on the server's side.

Debugging an API call? Convert your request with the cURL converter, check the response with the JSON formatter, or see whether the API is down on its status page.

Often confused with

HTTP 522 FAQ

What does HTTP 522 mean?

522 Connection Timed Out: Cloudflare's connection to the origin server timed out. Cloudflare tried to open a TCP connection to the origin and got no answer: the server is overloaded, unreachable or dropping Cloudflare's packets.

Is 522 a client or server error?

It's a server error (5xx): the server failed to handle a valid request, so the fix is usually on the server's side.

How do I fix a 522 error?

Retry later; the problem is on the site's side.

Should I retry after a 522?

Yes, with backoff.

Other 5xx status codes

All HTTP status codes