LightAtom

Cloudflare Error 524: A Timeout Occurred

Cloudflare connected to the origin and sent the request, but the origin took longer than Cloudflare's 100-second limit to start responding.

Error 524: A timeout occurred

The website's server accepted the request but took too long to answer, so Cloudflare stopped waiting after 100 seconds.

Quick checks

  • As a visitor: avoid repeating long actions (exports, reports) immediately; they may still be running.
  • As the owner: find requests that take more than 100 seconds.

If you’re visiting the site

  1. Wait, then check

    1. If you started a long task, wait and check whether it finished before running it again.

If you run the site

  1. Make the request faster or asynchronous

    1. Move long work to a background job and return immediately with a status URL the browser can poll.
    2. Optimise slow database queries behind the endpoint.
  2. Bypass the proxy for long jobs

    1. Serve long-running endpoints from a grey-clouded (DNS-only) subdomain, or stream progress so bytes flow within the limit.
    2. Enterprise plans can raise the proxy read timeout.

Still not working?

Use your app logs to find requests over 100 s. Reproduce with curl -w '%{time_starttransfer}\n' -o /dev/null -s https://ORIGIN/endpoint.

See what’s happening

LightAtom's connections view shows long-lived connections from your app to a slow backend while you test.

Frequently asked questions

What is Cloudflare's timeout?

Cloudflare waits 100 seconds for the origin to start sending a response on most plans. Longer requests end with error 524.

How do I fix error 524?

Make the endpoint respond within 100 seconds: move heavy work to background jobs, optimise queries, or serve long tasks from a hostname that isn't proxied.

What is the difference between 522 and 524?

522: Cloudflare couldn't connect to the origin. 524: it connected, but the response didn't start within 100 seconds.

LightAtom team

The people who build LightAtom, a network monitor for macOS.