Cloudflare Error 524: A Timeout Occurred

Cloudflare connected to the origin, but the origin didn’t send an HTTP response within 100 seconds.

Seen on: Cloudflare

Meaning

The request reached your app, but it took longer than Cloudflare’s proxy read timeout (100s on Free/Pro/Business). The work may still complete on the origin after the user sees the error.

Common causes

  • Long-running request (reports, exports, imports)
  • Slow database queries
  • Origin overloaded and queueing
  • Waiting on a slow external API

⚡ Quick fix

  1. Move long work to a background job and poll for status
  2. Optimize the slow query or endpoint
  3. Serve long-running endpoints from a grey-clouded (DNS-only) subdomain
  4. Enterprise plans can raise the timeout

Detailed fix by platform

Cloudflare

  1. Return quickly with 202 Accepted and a job ID; let the client poll a status endpoint.

How to diagnose

  1. Timing — How long does the endpoint take on origin?
  2. Bottleneck — DB, CPU or external call?

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.