HTTP 524 — A Timeout Occurred
HTTP 524
A Timeout Occurred
Cloudflare connected to the origin successfully but the origin did not finish responding in time.
What 524 actually means
Cloudflare's own code, not part of HTTP — effectively their version of a 504. The TCP connection was established and the request was delivered, but the origin did not send a complete response within Cloudflare's proxy read timeout, which defaults to 125 seconds. It always means the origin is running but slow: a long query, a heavy report, or a request waiting on something that never came back.
Common causes
- A request taking longer than Cloudflare's default 125-second proxy read timeout
- A slow database query or an unindexed table scan
- A long-running export, import or report generation done synchronously
- A WebSocket or long-polling connection idling past the timeout
- An origin waiting on a third-party API that never answers
If you're just trying to view the page
- Retry — if the operation is heavy, it may succeed when the server is less busy
- If you triggered a large export or report, try a smaller range
- Nothing else; the site's server needs to answer faster
If it's your site
- Move work that takes longer than a few seconds into a background job and return immediately with a status URL
- Profile and fix the slow path — the 125-second timeout is not adjustable below Enterprise
- Enterprise plans can raise the proxy read timeout as far as 6,000 seconds, but that is a workaround rather than a fix
- For long-lived connections, use Cloudflare's WebSocket support rather than long-polling over plain HTTP
- Consider routing the slow endpoint around Cloudflare on a grey-clouded (DNS-only) subdomain if it genuinely must run long
Reference
- Status code
- 524
- Reason phrase
- A Timeout Occurred
- Category
- 5xx — Server Error
- Cacheable by default
- No
Common questions
- What does HTTP 524 mean?
- Cloudflare connected to the origin successfully but the origin did not finish responding in time. Cloudflare's own code, not part of HTTP — effectively their version of a 504. The TCP connection was established and the request was delivered, but the origin did not send a complete response within Cloudflare's proxy read timeout, which defaults to 125 seconds.
- How do I fix a 524 error?
- Retry — if the operation is heavy, it may succeed when the server is less busy
- Is 524 a client error or a server error?
- 524 is in the 5xx range, which means server error. The request was acceptable but the server could not fulfil it, so retrying later can succeed.
Related pages
- 500 Internal Server Error Something went wrong on the server and it has no more specific code to describe
- 502 Bad Gateway A proxy or gateway reached the server behind it and got back a broken response,
- 503 Service Unavailable The server is temporarily unable to handle the request, usually because it is ov
- 504 Gateway Timeout A proxy or gateway waited for the server behind it and gave up before an answer
- 521 Web Server Is Down Cloudflare could not connect to the origin server because it refused the connect
- 522 Connection Timed Out Cloudflare tried to open a connection to the origin server and never got a reply
- 520 Web Server Returned an Unknown Error Cloudflare reached the origin server but got back a response it could not make s
- 525 SSL Handshake Failed The TLS handshake between Cloudflare and the origin server failed.
- 526 Invalid SSL Certificate The origin server presented a TLS certificate that Cloudflare could not validate
- 530 Origin DNS Error A Cloudflare error shown alongside a 1xxx error code that carries the real expla
- 501 Not Implemented The server does not support the functionality needed to fulfil the request, usua
- 511 Network Authentication Required You need to log in to the network itself — this is a captive portal, not the sit