Error 524 means Cloudflare successfully established a TCP connection to the origin server and sent the HTTP request, but the origin did not send back an HTTP response within the timeout period (100 seconds for Enterprise, shorter for other plans). The connection was established (unlike 522), but the origin is taking too long to process the request. This commonly happens with slow database queries, large file processing, long-running API calls, or backend services that are overloaded.
The request triggers a slow database query, file export, report generation, or API call that takes longer than Cloudflare's proxy timeout. The origin eventually responds, but too late.
High CPU, memory, or I/O usage causes all requests to process slowly. The server accepts connections but cannot process them quickly enough.
The origin application is waiting on a downstream service (database, external API, payment processor) that is slow or timing out, which cascades into a 524 at the Cloudflare layer.
The application allows scripts to run longer than Cloudflare's timeout, creating a mismatch where the app keeps processing but Cloudflare gives up waiting.
Check your application's slow query log, access log, or APM (Application Performance Monitoring) tool to find which requests are taking longer than 100 seconds.
If slow queries are the cause, add indexes, optimize query plans, or implement caching for expensive operations.
# MySQL: SHOW PROCESSLIST; or SELECT * FROM information_schema.processlist WHERE time > 30;
For operations that inherently take a long time (report generation, file processing), move them to a background queue and return a quick response with a status endpoint.
Monitor CPU, memory, disk I/O, and network to identify bottlenecks causing slow processing.
top -bn1 | head -10 && iostat -x 1 3
Enterprise customers can ask Cloudflare support to increase the proxy read timeout beyond the default 100 seconds for specific endpoints.
Cloudflare's TCP connection to the origin server timed out.
Cloudflare received an empty, unknown, or unexpected response from the origin server.
Cloudflare could not negotiate an SSL/TLS connection with the origin server.