Cloudflare · HTTP 524

Cloudflare Error 524: Origin Response Timeout

Trace Cloudflare 524 to an origin that accepts connections but does not return HTTP headers in time. Inspect application latency, database waits, and long-running work.

Origin / Application

Decode a CDN or gateway error

Paste a captured HTTP response or enter a status and headers. Only the status and response headers are sent; common credential headers are filtered first.

Supports raw headers, full HTTP responses, JSON with status/statusCode and headers, cURL -v/-i response output, and HAR exports. HAR selects a server error first. cURL commands are never executed; request headers, response bodies, and common credential headers are excluded.

Diagnostic report

Error code / name

CF-524

Fault domain

Origin / Application

Why it happened

Cloudflare established an origin connection, but the application did not begin its HTTP response before the configured response deadline. Slow database queries and synchronous jobs are common causes.

Actionable fixes

  1. Trace the request ID through application, database, and dependency spans to find the longest wait.
  2. Return a quick acknowledgement and move durable long-running work to a background job.
  3. Use bounded timeouts and cancellation for downstream calls so one dependency cannot hold the request indefinitely.

Why this error happened

Cloudflare established an origin connection, but the application did not begin its HTTP response before the configured response deadline. Slow database queries and synchronous jobs are common causes.

Actionable fixes

  1. Trace the request ID through application, database, and dependency spans to find the longest wait.
  2. Return a quick acknowledgement and move durable long-running work to a background job.
  3. Use bounded timeouts and cancellation for downstream calls so one dependency cannot hold the request indefinitely.

Network failure point

Client -> Cloudflare Edge -> TCP/TLS OK -> Origin accepts request -> no HTTP headers before deadline -> X

Verify origin directly via CLI

curl -sS -I -w 'connect=%{time_connect} starttransfer=%{time_starttransfer} total=%{time_total}\n' --max-time 120 https://example.com/health

Configuration fix

app/api/report/route.tstypescript
export async function POST(request: Request) {
  const jobId = await enqueueReport(await request.json());
  return Response.json({ jobId }, { status: 202 });
}

Catch this failure before it becomes an outage

SteadyNode records response latency across scheduled checks and translates gateway timeouts into origin-side clues, helping teams catch slow endpoints before they exceed edge deadlines.

No credit card required.

Start for free

Frequently asked questions

What is the difference between Cloudflare 522 and 524?

A 522 is a connection timeout. A 524 means the origin connection succeeded, but the origin did not return a response in time.

Should I increase the timeout to fix a 524?

First measure application and dependency latency. Raise a timeout only when the longer operation is expected and all upstream limits support it.

Cloudflare

Vercel and Netlify

AWS CloudFront and ALB

Fastly

Heroku and Render

Nginx and Envoy