522: Connection Timed OutHTTP 522 Connection Timed Out is a Cloudflare-specific status code indicating that Cloudflare's attempt to establish a TCP connection to the origin web server timed out. Unlike 521 where the connection is actively refused, 522 means the origin server did not respond at all within Cloudflare's connection timeout window (typically 15 seconds). This is one of the most commonly encountered Cloudflare errors for site operators.
522 Connection Timed OutGET /product/12345 HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0
Accept: text/htmlHTTP/1.1 522 Connection Timed Out
Content-Type: text/html; charset=utf-8
Server: cloudflare
CF-Ray: 9b2c3d4e5f6a7890-LHR
Content-Length: 310
<!doctype html>
<html lang="en">
<head>
<title>Error 522: Connection timed out</title>
</head>
<body>
<h1>Error 522: Connection timed out</h1>
<p>Cloudflare was unable to reach the origin web server.</p>
<p>Please try again in a moment. If the problem persists, contact the site owner.</p>
</body>
</html>Verify the origin server is reachable and responding to connections on the expected port.
Scan PortsEnsure the A/AAAA record in Cloudflare points to the correct origin server IP address.
Check DNS RecordsEnsure the origin server's firewall is not silently dropping connections from Cloudflare IP ranges. Use iptables or your firewall management tool to verify.
sudo iptables -L -n | head -50
If the server is overloaded, check CPU, memory, and connection limits. Consider scaling up or optimizing the application.
top -bn1 | head -20 && ss -s
The origin server is under heavy load and cannot accept new TCP connections within the timeout period.
A firewall is dropping Cloudflare's connection packets instead of rejecting them, causing the connection to time out rather than fail immediately.
There is a network connectivity problem between Cloudflare's edge servers and the origin server's IP address.
The A or AAAA record in Cloudflare DNS points to an incorrect or unreachable IP address for the origin server.
The origin web server refused or is not responding to Cloudflare's connection (Cloudflare).
Cloudflare established a TCP connection but the origin server did not respond with an HTTP response in time (Cloudflare).
The upstream server did not respond within the gateway's timeout period.
This reference was compiled from official RFCs, protocol specifications, and hands-on troubleshooting experience. AI tools were used primarily for formatting and organizing the content on the page.