HTTP 524 A Timeout Occurred

Non-standard, from Cloudflare: the connection to the origin succeeded, but no HTTP response arrived before the proxy timeout (125 seconds by default — Cloudflare's Proxy Read Timeout).

Non-standard — not defined by any RFC. Vendor documentation: Cloudflare 5xx error reference

Where you meet HTTP 524 in production

Report generation, large exports, slow database queries and synchronous calls to third parties — any request that keeps the connection open longer than the CDN's proxy read timeout — 125 seconds by default on Cloudflare.

Why you would test it

The classic long-running-request failure. Test that a slow export or report moves to a 202-and-poll design instead of holding a request open past the proxy timeout.

What your client should do about a 524

Do not just raise timeouts. Move long work to an asynchronous design: accept the request with 202, return a status URL, and poll. Retrying a 524 on a non-idempotent request can start the same slow job twice, because the origin may still be working on the first.

524 versus the codes it gets confused with

Endpoints that return 524

1 endpoint in this playground answers with 524. Every one is free, needs no signup, and can be called from the browser or with curl.

Questions about HTTP 524

Did the origin finish the request?
It may have. The CDN stopped waiting, not the origin. Check before retrying anything that changes state.
How do I avoid 524s?
Return quickly with 202 and a job URL, then let clients poll — the pattern the Protocol Lab's async jobs practise.

Other server error codes

All HTTP status codes · All 55 mock REST APIs · Getting started guide

Last updated