Cloudflare 524: your origin took too long to respond
Cloudflare error 524 means Cloudflare connected to your origin, but no HTTP response arrived before the timeout, 100 seconds by default.
Error 524: A Timeout Occurred means Cloudflare connected to your origin server and sent the request, but the origin didn’t return an HTTP response before Cloudflare’s timeout. The server is up; it’s just taking too long to answer.
What Cloudflare means by 524
According to Cloudflare’s 5xx error documentation, a 524 happens when a connection to the origin succeeded but no HTTP response arrived within the default timeout of 100 seconds. Enterprise customers can raise that limit. It’s Cloudflare’s version of 504 Gateway Timeout, and it differs from 522, where the connection itself never completes.
Common causes
- Long-running requests: big CSV exports, imports, report generation, backups started from an admin page.
- Slow database queries on large tables, or locks that make queries wait.
- Pages that wait on slow third-party APIs while rendering.
- Large XML sitemaps generated on the fly for every request.
- An overloaded server where requests queue for a free worker.
SEO impact
Googlebot sees a 5xx, so Google’s documentation applies: crawling slows, and URLs that keep failing drop out of the index. A page that takes anywhere near 100 seconds is a problem in itself, since visitors leave long before that and slow responses reduce how much Google crawls. If your XML sitemap is the URL that times out, Google may not be able to read it at all.
How to fix a 524
Make the request fast
- Find slow queries with your database’s slow query log or an APM tool, then add indexes or caching.
- Generate sitemaps and feeds on a schedule and serve them as static files.
- Cache pages at the edge where the content allows it.
Move long jobs out of the request
Cloudflare recommends running long tasks asynchronously and polling for their status. Return immediately, process in the background, and let the browser check back, the 202 Accepted pattern:
POST /admin/export -> 202 Accepted
Location: /admin/export/status/77
GET /admin/export/status/77 -> {"state":"running","progress":64}
GET /admin/export/status/77 -> {"state":"done","file":"/files/export-77.csv"}
For admin-only tasks you can’t refactor yet, Cloudflare also suggests a hostname that isn’t proxied (a “DNS only” record), so its timeout doesn’t apply. Make sure PHP’s max_execution_time and your web server’s own timeouts allow the job to finish, too.
How to check
The HTTP status checker reports response times for up to 50 URLs, so you can find slow pages before they hit the limit, and the page speed test measures server response time (TTFB) for a single page.
HTTP/2 524
date: Fri, 30 Oct 2026 11:26:58 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
cf-ray: 8d2f7b2d5e4f1a90-MRS Frequently asked questions
What is the timeout behind Cloudflare error 524?
Cloudflare waits 100 seconds by default for an HTTP response after connecting to your origin. Enterprise plans can raise the limit; on other plans the request has to finish faster.
How do I fix a 524 on a long export or import?
Run the job in the background and return right away with a job ID, then let the page poll a status URL. For admin tools, a hostname that isn’t proxied through Cloudflare also avoids the limit.
What is the difference between Cloudflare 522 and 524?
With 522 the connection to your origin never completes. With 524 the connection works, but the origin takes too long to send its response.