FaroTrend Mascot
FaroTrend

Digital Culture

How to Fix Error 522 Connection Timed Out in Cloudflare, DNS and Vercel Edge: Step-by-Step Guide

Step-by-step technical guide to diagnose and resolve Error 522 Connection Timed Out across Cloudflare proxy, DNS configuration, and Vercel Edge nodes.

FaroTrend Mascot
By FaroTrend
Published Oct 21, 2026 · Updated Oct 24, 2026, 09:04 PM UTC
2 min read48 views

Understanding Error 522: Cloudflare to Origin TCP Handshake Failure

Error 522 occurs when Cloudflare successfully receives an incoming HTTP request but fails to establish a TCP handshake with the origin server within 15 seconds. This condition typically stems from origin server saturation, dropped packets in transit, or firewall filters blocking Cloudflare reverse-proxy IP addresses.

To ensure operational resilience, DevOps and network engineers must pinpoint whether the failure lies at the web server software layer, local firewall rules, or DNS record routing.

Technical InsightAlways verify origin firewall rules and keep-alive headers before modifying edge proxy settings.

Primary Root Causes and Step-by-Step Resolution

Resolving Error 522 requires a methodical audit of origin server accessibility. First, whitelist all official Cloudflare IP ranges in origin firewall configurations (such as UFW, iptables, or cloud security groups). Next, inspect server resource metrics to guarantee Apache or Nginx processes are not exhausting available worker connections.

Finally, verify keep-alive timeouts and DNS records to ensure edge requests reach active origin endpoints without routing loops or premature drops.

Interactive Engineering ToolBrowse all tools

Sensitivity Converter & Cross-Game Aim Lab

Convert mouse sensitivity across Valorant, CS2, Fortnite, Warzone, Apex, Marvel Rivals and 16 shooters with exact cm/360, FOV scaling and 4:3 stretched m_yaw compensation.

Did you find this article interesting?

Your vote helps calibrate recommendations in the community.

Comments (1)

PingüinoCuantico64015 ptsOct 22, 11:31 AM UTC

Muchas gracias por la explicación tan clara, justo tenía este fallo al conectar Vercel con Cloudflare y me sirvió revisar los DNS

Recommended Reading