524 A Timeout Occurred
The HTTP 524 A Timeout Occurred status code is an unofficial server error specific to Cloudflare. This error occurs when Cloudflare successfully establishes a TCP connection to the origin server but does not receive a timely HTTP response.
Usage
Cloudflare is a content delivery network acting as a reverse proxy between clients and origin servers. The 524 error means the TCP handshake completed and Cloudflare sent the HTTP request, but the origin server did not return a response within Cloudflare's timeout window. The default timeout is 120 seconds across all plans. Enterprise plans support longer timeouts.
Common causes include:
- Long-running server-side processes such as database queries, report generation, or large file processing.
- The origin application is deadlocked or stuck in an infinite loop.
- Resource exhaustion on the origin server (CPU, memory, or I/O).
Note
A 524 differs from 522 Connection Timed Out in a critical way: a 522 means the TCP connection itself failed, while a 524 means the TCP connection succeeded but the origin did not send an HTTP response in time.
SEO impact
Search engines treat Cloudflare 524 responses as server errors. Persistent timeout errors reduce crawl rate and prevent indexing of affected URLs. Speeding up the origin response restores normal crawling.
Enterprise plans allow configuring longer timeout values through Cloudflare support.
Example
A client sends a request for a resource requiring heavy server-side computation. The origin server does not respond within 120 seconds, and Cloudflare returns a 524 timeout error.
Request
GET /reports/annual HTTP/1.1
Host: www.example.re
Accept: application/pdf
Response
HTTP/1.1 524 A Timeout Occurred
Date: Sun, 02 Mar 2026 10:35:00 GMT
Content-Type: text/html
Server: cloudflare
CF-RAY: 8a1b2c3d4e5f6-DFW
<html>
<head><title>524 Timeout</title></head>
<body>
<h1>Error 524</h1>
<p>A timeout occurred</p>
</body>
</html>
How to fix
The default proxy read timeout is 120 seconds (not adjustable on Free or Pro plans). The origin must begin sending a response within this window, or Cloudflare drops the connection with a 524.
Profile the slow origin endpoint. Identify long-running database queries, blocking API calls, or CPU-intensive processing consuming the full timeout window. Optimize these operations to return a response faster.
Move long-running tasks to a background worker (a queue system like Celery, Sidekiq, or SQS). Return an immediate 202 Accepted response with a task ID, and have the client poll a status endpoint for the result. This pattern keeps individual request times well below the timeout.
For processes requiring extended time, move the endpoint behind a DNS-only (grey-clouded) subdomain in Cloudflare DNS. Traffic to a DNS-only record bypasses Cloudflare's proxy and its timeout limits entirely.
Enterprise plan customers increase the timeout (up to
6,000 seconds) through a Cache Rule with the Proxy Read
Timeout setting. The content must be cacheable for the
rule to activate, though Caching is not
required. The
proxy_read_timeout value is also adjustable through
the Cloudflare zone settings API. A 1-second variance
between the configured and actual timeout is expected,
so set the value 1 second higher than the target.
The proxy write timeout is 30 seconds and is not adjustable. Ensure the origin reads the full request body within this window.
Takeaway
The 524 A Timeout Occurred status code is a Cloudflare-specific error generated when the origin server fails to deliver an HTTP response within the allowed timeout after a successful TCP connection.
See also
- 522 Connection Timed Out
- 408 Request Timeout
- 504 Gateway Timeout
- Troubleshooting Cloudflare Errors
- HTTP status codes