HTTP 524 · 5XX Cloudflare Edge Cacheable: No Retryable: Yes (idempotent only)

HTTP 524 A Timeout Occurred: Root Causes & Production Fix Guide

Cloudflare Error 524 means Cloudflare successfully connected to your origin server, but the origin did not return an HTTP response within Cloudflare's 100-second proxy read timeout.

Top Root Causes of HTTP 524

Beat Cloudflare's 100s Limit with 202 Async Jobs or SSE Streaming

// Pattern 1: Return 202 Accepted immediately & poll status
app.post('/api/export', async (req, res) => {
  const jobId = await enqueueExportJob(req.body);
  res.status(202).json({ jobId, statusUrl: `/api/jobs/${jobId}` });
});

// Pattern 2: Stream early headers + SSE heartbeat every 15s
res.setHeader('Content-Type', 'text/event-stream');
res.flushHeaders();

Verify with cURL

curl -i -sS --max-time 120 -w '\nTTFB: %{time_starttransfer}s\n' https://example.com/api/export

Interactive Stack Diagnoser (HTTP 524)

Frequently Asked Questions

Can I increase Cloudflare's 100-second timeout on the Free or Pro plan?

No. The 100-second timeout is fixed on Free, Pro, and Business plans. Either return HTTP 202 Accepted with async polling, stream early bytes (SSE/chunked), or run the endpoint on a DNS-only (grey-cloud) subdomain.

Does sending response headers early reset Cloudflare's 524 timer?

Yes—streaming SSE or chunked transfer data keeps the connection active so Cloudflare does not trigger 524 waiting for the first byte.

How is Cloudflare 524 different from 522?

522 means Cloudflare could not even complete the TCP connection; 524 means the connection succeeded, but your app took over 100 seconds to reply.

Related Status Guides & Header Tools