Verified error fix

Error 524 — a timeout occurred

Diagnose Cloudflare 524 when the proxy connects to the origin but the origin does not return a response within the read-timeout window.

Platform · CloudflareHTTP 524 Verified Aug 22, 2026
Quick answer

Cloudflare connected to the origin, but the origin did not send an HTTP response before the default 125-second Proxy Read Timeout. This is an origin-response problem, not a Workers CPU-time value.

Verified Aug 22, 2026

Why does this error happen?

  • A long database query or export kept the origin busy.
  • The origin was overloaded or resource constrained.
  • A large write did not complete within Cloudflare's proxy write timeout.

How do you diagnose it?

  1. Use the Ray ID, URL, timestamp, and timezone to correlate origin logs.
  2. Measure p95 and p99 response time by endpoint.
  3. Check application, load balancer, database, and upstream logs—not only the web server.

How do you fix it?

  1. Move long operations to an asynchronous job and poll for status.
  2. Optimize or split the slow origin work.
  3. Eligible Enterprise zones can configure a longer Proxy Read Timeout; otherwise consider a DNS-only subdomain for intentionally long requests.

How do you prevent it from recurring?

Turn the confirmed cause of Error 524 — a timeout occurred into an observable boundary for Cloudflare. Track the relevant request count, token volume, payload size, execution time, connection pressure, billing state, or upstream health before it reaches the documented failure condition. Preserve the platform request ID and timestamp so future incidents can be correlated without logging sensitive payloads.

Test the fix under representative concurrency and failure injection, not only with one successful request. Alert on remaining headroom and repeated retries, and keep the linked limit page and official error source with the runbook so responders can distinguish a configuration problem from temporary service pressure or account state.

Do not paste API keys, database URLs, tokens, or sensitive payloads into public error reports. Redact secrets before sharing diagnostics.
Related

Linked limits, tools, and alternatives