Avoid 524 on slow pages
The 100-second rule and how to design around it
Cloudflare waits 100 seconds for the first byte of your origin’s response. If it does not arrive, the visitor gets a 524 — even though your server may still be working on it.
Find the slow path
Exports, reports, imports, payment callbacks and big searches are the usual suspects. Look for requests over 30 s in origin logs; they are the ones that turn into 524 under load.
Answer early, work later
Return a response within seconds: queue the job, give the visitor a status page or poll endpoint, and deliver the result when it is ready. This is the fix Cloudflare recommends, and it survives any timeout.
Stream if you cannot queue
Sending early bytes (headers and a shell of the page) resets Cloudflare’s clock to the idle timeout; a streaming response keeps long jobs alive as long as bytes keep flowing.
Raise the limit only as a last resort
Enterprise plans can raise the proxy read timeout. It hides the problem rather than fixing it, and visitors still wait.
All guides