524 A Timeout Occurred
Cloudflare connected to your origin and delivered the request, then waited for an HTTP response that did not come before its time limit.
What 524 means
Unlike the other 52x errors, a 524 means the network is fine. The TCP connection was made and the origin acknowledged the request. Then the application took too long to start answering, and Cloudflare's Proxy Read Timeout expired.
Cloudflare's documentation currently gives that default as 125 seconds. For years it was documented as 100 seconds, and most older articles still quote that figure. Either way the fix is the same: design for responses that begin well inside the limit.
A 524 is also returned when Cloudflare cannot finish sending the request to the origin within the Proxy Write Timeout of 30 seconds. That limit cannot be changed.
As with a 504, the origin is not told to stop. The job that timed out may well complete, with nobody listening for the result.
Why the origin was slow
- A long-running operation done inside the request: a large export, a report, a bulk import, a backup or migration started from an admin page.
- A heavy database query, or one stuck behind a lock.
- An origin short of CPU, memory or workers, so that requests queue before they are even started.
- A call from the origin to another service that is itself hanging.
Log response times at the origin. In nginx, add $request_time and $upstream_response_time to the log_format; the requests behind 524s are the ones that run past the limit, or that end in 499 when Cloudflare hangs up.
Fixing it
- Make the request return quickly. Start the work in a background job, respond at once with a job ID, and have the client poll a status URL. Cloudflare recommends this pattern for large processes.
- Speed up the slow part: indexes, caching, smaller batches, pagination.
- Route long requests around the proxy. Cloudflare suggests putting processes that regularly exceed the limit on a subdomain whose DNS record is DNS-only (grey cloud). That host loses Cloudflare's caching and protection and exposes the origin's address, so keep it for the endpoints that need it.
- Raise the limit, on Enterprise only. Enterprise customers can increase the timeout to as much as 6,000 seconds, with a Cache Rule's Proxy Read Timeout setting or the zone's
proxy_read_timeoutsetting through the API. Other plans cannot change it. - Check the origin's own timeouts. If nginx gives up on its upstream after 60 seconds, visitors get a 504 from the origin before Cloudflare's limit is ever reached.
524 compared with 522, 504 and 520
| Code | Generated by | What timed out or failed |
|---|---|---|
| 524 | Cloudflare | Waiting for the origin's HTTP response |
| 522 | Cloudflare | Establishing the TCP connection, or getting the request acknowledged |
| 504 | Your own proxy, or any other gateway | Waiting for its upstream; passed through by Cloudflare |
| 520 | Cloudflare | Nothing timed out; the response was empty or invalid |
Example 524 response
HTTP/2 524
date: Sat, 14 Nov 2026 10:17:45 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
cf-ray: 8e2a50e2d8a6b47c-LHRA 524 that always arrives the same number of seconds after the request was sent is the signature of the read timeout. Shorter, irregular failures point elsewhere.
Documented in Cloudflare docs: Error 524.
Questions
How long does Cloudflare wait before returning a 524?
Cloudflare's documentation gives the default Proxy Read Timeout as 125 seconds. Older documentation and many guides say 100 seconds. Only Enterprise customers can raise it, up to 6,000 seconds.
Can I increase the Cloudflare timeout on a Free or Pro plan?
No. The read timeout is adjustable only on Enterprise plans. On other plans, move the long-running work to a background job with status polling, or serve that endpoint from a DNS-only subdomain that does not pass through Cloudflare's proxy.
Did my request complete if I got a 524?
Possibly. Cloudflare stopped waiting, but the origin may have carried on and finished. Check the result on the server before repeating an import, payment or other action that changes data.
What is the difference between a 524 and a 504 behind Cloudflare?
A 524 is generated by Cloudflare when the origin is too slow for Cloudflare's limit. A 504 is generated by a proxy on your own side, such as nginx waiting for its application server, and Cloudflare merely passes it on.