524: A Timeout OccurredHTTP 524 A Timeout Occurred is a Cloudflare-specific status code meaning that Cloudflare successfully connected to the origin server, but the origin did not provide an HTTP response before the connection timed out (100 seconds for Free/Pro plans, 600 seconds for Enterprise). Unlike 522 which is a TCP connection timeout, 524 means the TCP connection was established but the origin server took too long to generate a response — typically caused by long-running scripts, slow database queries, or resource-intensive operations.
524 A Timeout OccurredGET /account HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0
Accept: text/htmlHTTP/1.1 524 A Timeout Occurred
Content-Type: text/html; charset=utf-8
Server: cloudflare
CF-Ray: 7c3d4e5f6a7b8901-SFO
Content-Length: 327
<!doctype html>
<html lang="en">
<head>
<title>Error 524: A timeout occurred</title>
</head>
<body>
<h1>Error 524: A timeout occurred</h1>
<p>Cloudflare connected to the origin server, but the server took too long to respond.</p>
<p>Please try again in a moment. If the problem persists, contact the site owner.</p>
</body>
</html>Check your application logs and server monitoring to identify which endpoints are exceeding the timeout threshold.
Move long-running operations to background jobs or async processing. Add database query optimization and caching.
Enterprise plan users can increase the proxy read timeout beyond 100 seconds via the API or dashboard.
Monitor CPU, memory, and connection pool usage on the origin server to identify resource bottlenecks.
top -bn1 | head -10 && free -h && ss -s
The origin server is executing a slow operation (large database query, file processing, report generation) that exceeds Cloudflare's response timeout.
The origin server has run out of PHP workers, Node.js event loop capacity, database connections, or other resources needed to produce a response.
The application is waiting on a slow third-party API, external database, or microservice that is not responding.
Cloudflare could not negotiate a TCP handshake with the origin server (Cloudflare).
The origin web server refused or is not responding to Cloudflare's connection (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.