HTTP 522 Connection Timed Out vs 524 A Timeout Occurred
Both HTTP 522 (Connection Timed Out) and 524 (A Timeout Occurred) belong to the 5xx Server Error category. 522 indicates that cloudflare-specific. TCP connection to the origin server timed out. Meanwhile, 524 means that cloudflare-specific. A TCP connection was established but the origin didn't respond with an HTTP response in time.
Description
Cloudflare-specific. TCP connection to the origin server timed out.
When You See It
When the origin server is overloaded or network issues prevent connection.
How to Fix
Check origin server health. Verify firewall rules. Check for network congestion.
Description
Cloudflare-specific. A TCP connection was established but the origin didn't respond with an HTTP response in time.
When You See It
When a request to the origin takes longer than Cloudflare's 100-second timeout.
How to Fix
Optimize slow endpoints. Move long-running tasks to background jobs.
Key Differences
HTTP 522: Cloudflare-specific. TCP connection to the origin server timed out.
HTTP 524: Cloudflare-specific. A TCP connection was established but the origin didn't respond with an HTTP response in time.
You encounter 522 when when the origin server is overloaded or network issues prevent connection.
You encounter 524 when when a request to the origin takes longer than Cloudflare's 100-second timeout.
When to Use Which
For 522 (Connection Timed Out): Check origin server health. Verify firewall rules. Check for network congestion. For 524 (A Timeout Occurred): Optimize slow endpoints. Move long-running tasks to background jobs.