Contents
A 524 isn’t a network outage and it isn’t Cloudflare failing. The connection to your origin server worked and the request arrived; Cloudflare then waited for the first byte of an HTTP response until its timeout expired, closed the request and showed the 524 page. The script may still finish on the server afterwards, but the visitor never sees the result.
How 524 differs from similar Cloudflare errors
| Error | What happened between Cloudflare and the server |
|---|---|
| 521 | The server refused the connection |
| 522 | The connection didn’t complete in time |
| 524 | Connected fine, but the response took longer than the timeout |
So with 524, the problem is how long the server takes to process the request, not reaching it.
Common causes
- A long PHP script: importing a big CSV or thousands of products, a backup plugin building an archive, bulk email, report generation.
- Slow database queries: large tables without indexes, or tables locked by another process.
- Waiting on an external API: a payment gateway or AI service that answers slowly, called without a timeout.
- Hitting your account’s resource limits: once the site uses up its CPU or concurrent-process allowance, requests slow down or queue.
- Traffic spikes or aggressive crawlers on pages that can’t be cached, like search and cart.
How to fix it
If you’re a visitor
The problem is on the site’s side, not your device. Wait a minute and reload. If it appeared after you placed an order or submitted a form, don’t resubmit straight away: the action may have gone through. Check your email or contact the site owner.
If you own the site
-
Find the slow request. Does the error hit one URL (an import page,
admin-ajax.php) or the whole site? Open cPanel » Metrics » Errors and look for messages likeMaximum execution time exceeded(see maximum execution time exceeded). -
Time the origin directly, bypassing Cloudflare:
curl -so /dev/null -w "%{time_total}\n" --resolve example.com:443:203.0.113.10 https://example.com/slow-pageReplace
203.0.113.10with your server’s IP. If it takes longer than 100 seconds, the application itself is the problem. -
Check resource limits in cPanel » Metrics » Resource Usage. If the account was hitting its CPU, memory or Entry Processes limit when the error appeared, reduce load with caching or move to a more suitable plan.
-
Move long jobs to the background. Run imports, backups and mailings from cPanel » Advanced » Cron Jobs so the page returns immediately and the job finishes on its own:
*/5 * * * * /usr/local/bin/php /home/USER/public_html/cron/import.phpThe cron generator helps you build the schedule.
-
Break big operations up: import in small batches, index the columns you filter and sort on, and set a timeout on outbound calls (for example
CURLOPT_TIMEOUTin cURL). -
For heavy admin tasks you can use a subdomain that isn’t proxied by Cloudflare (grey cloud, DNS only), so Cloudflare’s timeout doesn’t apply. It’s a workaround, not a substitute for making the task faster.
Prevention
- Turn on page caching (LiteSpeed Cache on WordPress) so PHP doesn’t run on every visit.
- Watch your TTFB after installing plugins or major updates.
- Anything that takes more than a few seconds belongs in a background job, not in a visitor’s request.
On ArabyHost
Sites run on the LiteSpeed web server, and every account has its own resource limits (LVE) under CloudLinux, so the Resource Usage page in cPanel (one click from the Araby Panel) tells you whether slowness comes from hitting those limits. The Araby AI assistant in the panel reads your error logs and explains what is slow and how to fix it. On AI/Developer plans you can run long jobs over SSH or as background workers kept alive with cron, away from Cloudflare’s timeout. With Cloudflare in front, use SSL mode Full (strict), since the server has a valid AutoSSL certificate; see using Cloudflare with your hosting.
FAQ
Can I increase Cloudflare's timeout to avoid error 524?
Not on the Free, Pro or Business plans; raising it is an Enterprise feature. The practical fix is to make the request faster or run the long job in the background.
Does error 524 mean my server is down?
No. The server is up and accepted the connection; it just took too long to answer. If the server refused or never completed the connection you would see 521 or 522 instead.
Will raising PHP max_execution_time fix it?
Not on its own. Cloudflare stops waiting after its timeout even if the script keeps running on the server. A higher limit only helps jobs that run outside Cloudflare, such as cron or the command line.