Cloudflare Error 524: A Timeout Occurred means Cloudflare connected to your origin and your server accepted the request, but the server did not finish sending the response within 100 seconds, which is the fixed limit on the Free and Pro plans. The cause is a slow operation on the origin, such as a long-running PHP script, a heavy database query, or a large import. The fix is to optimize the slow operation, raise PHP max_execution_time where appropriate, or move the long job to cron or the command line instead of running it in a web request.
Move the slow operation off the web request
A 524 is a long-running request that exceeds Cloudflare's 100-second limit. The durable fix is to make the operation faster or run it outside the browser. Optimize the slow query or script, and move imports, backups, and batch jobs to a cron task or the command line so they never run inside a web request at all.
01. What Error 524 Means
Error 524 happens after a connection is already established. Cloudflare connected to your origin, the server accepted the request, but more than 100 seconds passed without a complete response. On the Free and Pro plans that 100-second ceiling is fixed and cannot be raised in the Cloudflare dashboard.
This is the opposite of a 522. A 522 means Cloudflare could not even connect. A 524 means it connected fine and then waited too long for the origin to finish. That difference tells you to look at what the request is doing on the server, not at the firewall.
02. Common Triggers
A 524 almost always traces to one request that simply takes too long. Typical triggers include:
- A slow PHP script that loops or waits on an external API.
- A heavy database query, such as an unindexed search across a large table.
- A WooCommerce or WordPress import, export, or product sync processing thousands of rows.
- A backup or maintenance task kicked off from the browser.
- A large file upload pushed through the web request.
If the 524 only appears on one admin action, like running an import or regenerating thumbnails, that confirms it is a long single operation rather than a site-wide problem.
03. How to Fix It
Work from the fastest, most durable fix to the fallbacks.
- Optimize the query or script - add the missing database index, cache the result, or break the work into smaller batches so each request returns quickly.
- Raise PHP max_execution_time - in cPanel under MultiPHP INI Editor, increase
max_execution_timefor the domain. This can help the script finish, but note Cloudflare still cuts the response at 100 seconds, so this alone will not save a job that runs longer than that. - Move the job to cron or CLI - run imports, exports, and batch operations as a scheduled cron task or from the command line so they are not bound by the web request at all.
# example: run a WordPress import or task via WP-CLI instead of the browser
wp <command> --path=/home/<user>/public_html
The 100-second limit on Free and Pro cannot be changed from the Cloudflare dashboard. Only the Enterprise plan allows a custom origin timeout. On our platform the right answer is almost always to shorten the operation or move it to cron, not to chase a higher timeout.
04. Large Uploads Belong on SFTP
Uploading large files through a browser form is a frequent 524 trigger, because the whole transfer has to complete inside the request window. For anything sizeable, use SFTP or FTP instead.
- Connect with an SFTP client using your cPanel username and password.
- Upload directly to the target directory, bypassing the web request entirely.
- For media libraries, upload the files by SFTP and then import or register them from within the application.
Still Seeing Error 524?
If you have optimized the operation and moved long jobs to cron but a specific page still times out, open a ticket with the Cloudflare Ray ID and the exact URL or action that triggers it so we can profile what the request is doing on the server.
Open a Support TicketFrequently Asked Questions
What is the difference between a 524 and a 522 error?
A 522 means Cloudflare could not establish a connection in time. A 524 means the connection succeeded and Cloudflare waited, but your origin did not finish sending a response within roughly 100 seconds. A 524 points at a long-running request, not a connection problem.
What causes Cloudflare Error 524?
A single request is taking too long to complete, most often a slow PHP script, a heavy database query, a long import or report, or an external API call that hangs. Cloudflare closes the connection after about 100 seconds and returns 524.
How do I fix a 524 timeout?
Find and speed up the slow request. Check your slow query log and site error_log, optimize or add indexes to heavy database queries, and move long tasks such as imports, backups, and report generation to a background cron job instead of running them in a web request. Caching the slow page also avoids regenerating it on every hit.
Can I raise the 524 timeout limit?
On Cloudflare's free and pro plans the roughly 100-second limit is fixed and cannot be raised, so the real fix is to make the request finish faster or run it outside the web request. Enterprise plans allow a higher timeout, but speeding up the task is the correct long-term solution.
Quick Recap
- 524 is a response timeout - the origin connected but took over 100 seconds, unlike a 522 connect timeout.
- Find the slow operation - usually one script, query, or import.
- Optimize first - index the query, cache results, or batch the work.
- Move long jobs off the web - run imports and backups via cron or CLI.
- Upload big files by SFTP - do not push large transfers through a browser request.
Troubleshooting Cloudflare errors · Last updated November 2026 · Browse all Errors articles
Part of our Troubleshooting Cloudflare Errors series.
