Error message · Any site behind Cloudflare, especially WordPress and app pages that run long tasks

“Error 524 A timeout occurred”

Cloudflare connected to your server fine and sent the request, but your server didn't finish building the page within Cloudflare's limit (100 seconds on most plans). The connection worked; the page was too slow. It's often one slow page or process (a report, an export, a slow database query) rather than the whole site, and the same page would also be painfully slow without Cloudflare.

Is your site showing it right now?

The free scan loads your page like a visitor and checks for this message, plus broken links, script errors and phone layout. It also walks your signup, booking or contact form, without sending anything.

​

Free, no signup. Usually done in about a minute.

Why it happens

  • A slow database query or a heavy, uncached page that takes minutes to render
  • A long-running task inside a web request: an import, an export, a backup, sending a batch of emails, generating a big report
  • The server is overloaded, so every request queues and the slow ones never finish
  • A page waits on a third-party API (payments, shipping rates, a feed) that hangs
  • WordPress cron (wp-cron) running heavy jobs during a visitor's request

How to fix it

  1. Find the slow page

    The 524 names the URL. Load it directly, bypassing Cloudflare, and time it. If it's one page or one action (an export, a checkout step), the fix is in what that page does; if everything is slow, the server is overloaded.

  2. Read the slow logs

    Turn on your database's slow query log and PHP-FPM's or your framework's slow request log. The slowest entries name the query, plugin or external call to fix or cache.

  3. Move long work out of the request

    Run imports, exports, reports and email batches as background jobs and show the result when they finish. Add a short timeout to outbound API calls. On WordPress, disable wp-cron in wp-config.php and run it from a real cron job instead.

  4. Cache and lighten the page

    Page caching (a plugin or Cloudflare's cache rules) and query caching turn a 2-minute render into milliseconds for every visitor after the first. Optimise or remove the heaviest plugin the slow log points at.

  5. For a page that must run long, bypass Cloudflare for it

    An admin export that legitimately takes minutes can live on a grey-cloud subdomain (not proxied), or run in the background with a progress page. Enterprise plans can raise the 100 s limit; others can't, so the page has to be faster or go around Cloudflare.

Questions

Is 524 the same as 504?

Close: both mean the server behind the proxy was too slow. A 504 comes from your own web server or load balancer waiting on your app; a 524 comes from Cloudflare waiting on your server. The slow part is your app either way.

Can I just raise Cloudflare's timeout?

Only on Enterprise plans. On other plans the 100 second limit is fixed, which is a reasonable prompt: a page that takes longer loses visitors anyway.

Why only during the day?

Load. The same slow query finishes at night when the server is idle and times out when visitors pile up. Caching and a lighter query fix it at any hour.

Can Page Canary tell me if this comes back?

Yes. Page Canary checks your key pages every day for this message and others like it, confirms it on a second check, and emails you with the fix. One site is free.

Other error messages