Cloudflare error · 524

Cloudflare error 524: a timeout occurred

Cloudflare error 524 means the TCP connection to your origin succeeded and Cloudflare did not receive a complete HTTP response before its proxy read timer ended. On typical Cloudflare plans that timer is 100 seconds.

HTTP status codes explained · the longer reference on the blog.

What 524 means

524 is Cloudflare’s code. The origin was reachable and accepted the connection. It then kept the request open too long: a slow database, a long export, an upstream call with no timeout, or an app waiting on a lock. Cloudflare closed the wait and showed the visitor an error. The origin may still finish the work afterward.

This is the Cloudflare-shaped version of a 504 Gateway Timeout. 522 is earlier, when the TCP handshake itself does not finish. Error 524 means the handshake did finish. The homepage checker gives up at 10 seconds, so a response that would have become a 524 at 100 seconds often shows up in the checker as a timeout with no HTTP status, unless Cloudflare has already returned an error page.

Common causes

  • The request does too much before it replies

    A page that builds a large report, imports a file, or calls several slow APIs in series crosses the proxy timer. The same URL is fast when the data is small.

  • A downstream call has no timeout

    The app waits forever on a database lock or an HTTP client. Cloudflare stops at its limit and the worker stays busy.

  • The origin is saturated

    Requests queue for a worker. Queue time plus work time exceeds the limit. A few requests that start immediately still return 200.

  • A long poll is going through the proxy

    A request designed to stay open, such as a download that generates bytes slowly, is a poor match for a proxied hostname with a 100-second cap.

How to fix it

  • Find the slow request on the origin

    Match the timestamp. The access log often shows a response time over 100 seconds and a status the visitor never saw, because Cloudflare had already returned 524.

  • Return early and finish the work in the background

    Accept the job, respond, and let a worker finish. A proxied HTTP request is the wrong place for a multi-minute task.

  • Add timeouts inside the app that fire first

    Database and HTTP clients should fail with a clear application error before Cloudflare hits 100 seconds. You then see a 500 or a designed error in your own logs.

  • Keep long downloads off the orange-clouded path

    If a response genuinely needs to stream for longer than the plan allows, serve that path in a way Cloudflare documents for long responses, or host that file where the timer does not apply. Do not raise every page to match one slow job.

Is it your site, or just you?

A 524 happens after Cloudflare has the request, so it is shared by visitors using the proxied host. Confirm on a second network. A page that is fast for you and slow for others can still be data-dependent.

Use the homepage checker on the same URL. A timeout from the checker, or HTTP 524, means the URL is slow from outside your browser. A fast 200 means this particular request finished quickly and you should retry the exact action that hung.

How to monitor for 524

Monitor the URL visitors actually open and expect 200. A monitor waits up to 60 seconds for an answer, so you are alerted on a stuck URL well before Cloudflare’s 100-second page, which is what you want. A check that receives HTTP 524 fails the same way. Free monitors run every 10 minutes and alert after a second consecutive failure.

The checker on the ismysiteup homepage requests the URL from our servers and shows the HTTP status, response time, and SSL details. No account is required, and that checker allows 5 checks per hour from the same network. A free account watches 5 URLs, each checked every 10 minutes, and sends alerts on WhatsApp, Telegram, Slack, or email. A monitor expects HTTP 200 unless you set a different expected status (100–599). One failed check is confirmed with a second check before the first alert, and a later success sends a recovery alert. Pro (every 5 minutes) and Business (every minute) are listed on the pricing page; paid checkout is not open yet.

Compare Free, Pro, and Business

Related status codes

FAQ

What does Cloudflare error 524 mean?

The origin accepted the connection and did not finish the response before Cloudflare stopped waiting. On typical plans that limit is 100 seconds.

How is 524 different from 522?

522 means the TCP connection never finished. 524 means the connection succeeded and the HTTP response did not arrive in time.

Will a 5-minute monitor catch a 524?

It catches the next scheduled check that fails. It will not sit on the request for 100 seconds. Set the monitor timeout to the response time you consider healthy, up to 60 seconds.