Cloudflare Errors
Cloudflare Error 524
Last reviewed
Direct answer
524Cloudflare Error 524 means Cloudflare successfully connected to your origin server but the origin took too long to send back a complete HTTP response — usually slow PHP, a stuck database query, or exhausted server resources, not a network outage. Fix what is slow on the origin rather than only raising Cloudflare timeout settings.
HTTP 524 is a “timeout occurred” error at the application-response stage, not a connectivity failure like 521 or 522. The TCP handshake worked; Cloudflare simply gave up waiting for the page to finish generating. This guide shows how to tell 524 apart from other Cloudflare 5xx codes and how to find and fix the slow origin process actually causing it.
Key facts
Verifiable numbers and definitions — each claim links to its source.
- HTTP 524 means Cloudflare connected to the origin but did not receive a complete HTTP response before the Proxy Read Timeout (125 seconds by default). (Cloudflare Error 524)
- Cloudflare also documents a Proxy Write Timeout of 30 seconds (6.5 seconds for Cloudflare Images) that can surface as 524. (Cloudflare Error 524)
- Cloudflare's connection-limits reference documents HTTP/HTTPS origin timeouts operators should compare against long-running requests. (Cloudflare connection limits)
What the error means
When Cloudflare proxies a hostname, it opens a connection to your origin and waits for a full HTTP response. Error 524 fires when that connection succeeds but the origin never finishes responding within Cloudflare’s connect timeout window (100 seconds by default on most plans, adjustable higher only on Enterprise). That is different from 521 (origin refused the connection outright) and 522 (the TCP handshake itself never completed). On WordPress, 524 almost always traces back to a page that is genuinely slow to render — a heavy plugin, an unindexed database query, a stuck cron job, or a server starved of CPU or PHP-FPM workers — rather than anything wrong with Cloudflare itself.
Common symptoms
- Visitors see Cloudflare’s “524: A timeout occurred” error page after a long wait
- A Ray ID is shown on the error page; the delay is noticeably longer than a normal page load
- Only specific heavy pages (checkout, search, large archives, admin-ajax, reports) time out while simple pages load fine
- Bypassing Cloudflare (grey-cloud or direct origin IP) eventually loads the same page, just slowly
- Server logs show PHP or MySQL still working long after the visitor’s browser has given up
- The problem worsens under traffic, during cron runs, or right after a plugin or import job
- Intermittent 524s that clear once server load or a specific query is fixed
Most likely causes
- 01 Slow or locked MySQL queries that never return within Cloudflare’s response window
- 02 A plugin, widget, or custom code doing heavy processing on every page load
- 03 PHP-FPM or web server workers exhausted, so requests queue instead of executing promptly
- 04 WordPress cron (wp-cron.php) triggering large tasks — imports, backups, email sends — inline with a page request
- 05 External API calls from WordPress (payment gateways, shipping rate lookups, feeds) hanging without a sane timeout
- 06 Underpowered hosting plan or resource limits throttling CPU during traffic spikes
- 07 Database tables missing indexes so queries scan far more rows than necessary as data grows
What changed before the problem started
- New plugin, theme, or WooCommerce extension added heavy queries or API calls
- Traffic spike, sale, or bot crawl increasing concurrent load on the origin
- Database growth without matching indexes as content or orders accumulated
- A large import, migration, or bulk update job kicked off in the background
- Hosting resource limits or PHP-FPM pool size reduced during a plan change
- A new third-party API integration on checkout or forms started responding slowly
Troubleshooting steps
- 01
Confirm it is really 524, not 522 or 502
Read the Cloudflare error page carefully — it names the code and shows a Ray ID. 524 means the connection succeeded but the response was too slow; 522 means the connection itself failed. Confirming the exact code stops you from chasing the wrong layer.
- 02
Time the page with Cloudflare bypassed
Grey-cloud the DNS record temporarily (or hit the origin IP with the correct Host header) and load the same URL directly. If it still takes 30+ seconds, the delay is on your server, not in Cloudflare’s network — focus your fix there.
- 03
Check PHP and MySQL slow logs for the affected URL
In cPanel, Plesk, or your host’s log viewer, look for slow query logs and PHP slow-log entries around the timestamp of the 524. The specific query or script named there is almost always the actual bottleneck.
- 04
Disable heavy plugins one at a time and retest
Rename suspect plugin folders under `wp-content/plugins` via FTP or File Manager — start with SEO, analytics, backup, and “all in one” style plugins known for heavy queries. Retest the slow page after each change to isolate the culprit without losing settings.
- 05
Move WordPress cron off real visitor requests
If backups, imports, or scheduled tasks run inline via `wp-cron.php`, disable the default trigger in `wp-config.php` (`define('DISABLE_WP_CRON', true);`) and set up a real server cron job to run it every few minutes instead. This prevents a random visitor’s page load from triggering a long-running task.
- 06
Capture the Ray ID and timing details for support
Copy the Ray ID from the 524 page, note the exact URL, how long the page took before timing out, and any slow-log entries. That packet is what your host needs to confirm the bottleneck and what Cloudflare support needs if you escalate.
When to stop troubleshooting
Stop and get help if slow logs point to a query or job you cannot safely modify, the slowdown affects checkout or lead capture during business hours, you lack database or hosting access to investigate further, or disabling plugins does not change the timing at all. A 524 tied to database performance under load is not a settings toggle — it usually needs a technician who can read the query plan.
Information to collect before requesting help
- 01 Cloudflare Ray ID from the 524 page
- 02 Exact URL that times out and how long it takes before failing
- 03 Whether the same page is slow (not fixed) with Cloudflare bypassed
- 04 PHP slow-log and MySQL slow-query-log excerpts around the failure time
- 05 Recent plugin, import, migration, or traffic changes
- 06 Hosting provider, plan level, and PHP-FPM worker limits if known
- 07 Whether the delay is constant or only appears under traffic or during cron runs
How a professional repairs the problem
We confirm the timing is an origin-response delay rather than a connectivity failure, read PHP and database slow logs to the exact query or script responsible, fix the root cause — indexing, plugin replacement, cron isolation, or worker capacity — and verify the page returns well under Cloudflare’s response window before leaving the proxy fully enabled.
Frequently asked questions
Does raising Cloudflare’s timeout setting fix 524? +
Is 524 the same as my site being down? +
Will clearing Cloudflare cache fix a 524? +
Why does only one page time out while the rest of the site is fine? +
How is 524 different from a WordPress 500 error? +
Can WordPress cron cause 524 errors? +
Repair dispatch
Still Need Help Fixing Your Website?
If you are not comfortable editing website files, changing server settings, repairing a database, or troubleshooting a live website, professional help may prevent additional damage or downtime. We will review the problem before accepting the repair.
- You will receive a clear explanation of the likely cause.
- We will tell you if the issue falls outside our repair scope.
- No additional work will be performed without approval.
- A backup should be created whenever access and website condition allow it.
Do not share passwords through an unencrypted contact form — use Password Pusher (self-destructing link). Prefer a dedicated Rescue 404 admin account, not your personal owner login; if you cannot create one yet, we will add ours after repair.