524: A Timeout Occurred, what it means and what to do

This code is not part of the official HTTP standard. It comes from Cloudflare, the network that sits in front of a large share of the web, and you only see it on sites that use Cloudflare. Error 524 means everything connected and then the wait ran out. Cloudflare successfully reached the origin, sent the request, and the origin acknowledged it, but no complete HTTP response came back within Cloudflare's read timeout, which is 100 seconds by default. The origin was working on the request the whole time; it was simply slower than the limit. Long reports, heavy imports, unoptimized database queries, and crons triggered by web requests live here.

If you are just visiting a site

  1. Wait and retry in a few minutes. The problem sits between Cloudflare and the site's own server, and it often clears when that server recovers.
  2. There is nothing to fix on your device. A different browser, a cleared cache, or a restarted phone produces the same error, because your request reached Cloudflare successfully and failed after that.
  3. Tell the site owner through another channel if it persists, their social account or a status page. Owners often learn about origin failures from visitors first.

If it is your site behind Cloudflare

  1. Find the slow request in the origin logs. The origin usually completes the work after Cloudflare has given up, and its log shows both the endpoint and the true duration. That endpoint is your problem, named precisely.
  2. Optimize the slow operation. The durable fix is making the work faster: index the query, paginate the report, cache the result. Everything else is negotiation with a clock.
  3. Move long jobs off the request. Anything routinely near 100 seconds belongs in a background job that the visitor starts and polls, not a page load. This is the structural fix and the one that lasts.
  4. Know your options on the clock itself. The read timeout can be raised on higher Cloudflare plans, and long-polling endpoints can be placed on a subdomain kept outside Cloudflare's proxy. Both are legitimate, both treat the symptom.
Visitors: the site heard you and was still working when the connection was cut. Owners: a 524 is a slow endpoint with its name in your logs, background it or speed it up.

Common questions

What is the difference between 524 and 504? They are cousins from different vendors. A 504 is the standard HTTP code for a gateway timing out on an upstream server. A 524 is Cloudflare's specific version: the connection to the origin succeeded, but the response exceeded Cloudflare's read timeout.

Did my request actually go through when I see a 524? Often, yes, partially or fully. The origin frequently completes the task after Cloudflare stops waiting. That matters for actions like payments or submissions: check the result before repeating the action, or you may do it twice.

Related errors

504 Gateway Timeout · 522 Connection Timed Out · 502 Bad Gateway