# Cloudflare Error 524: A Timeout Occurred

**Code:** `524` · **Category:** Cloudflare · **Seen on:** Cloudflare

Cloudflare connected to the origin, but the origin didn’t send an HTTP response within 100 seconds.

## Meaning

The request reached your app, but it took longer than Cloudflare’s proxy read timeout (100s on Free/Pro/Business). The work may still complete on the origin after the user sees the error.

## Common causes

- Long-running request (reports, exports, imports)
- Slow database queries
- Origin overloaded and queueing
- Waiting on a slow external API

## Quick fix

1. Move long work to a background job and poll for status
2. Optimize the slow query or endpoint
3. Serve long-running endpoints from a grey-clouded (DNS-only) subdomain
4. Enterprise plans can raise the timeout

## Detailed fix by platform

### Cloudflare

1. Return quickly with 202 Accepted and a job ID; let the client poll a status endpoint.

## How to diagnose

1. **Timing** — How long does the endpoint take on origin?
2. **Bottleneck** — DB, CPU or external call?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cloudflare/524-a-timeout-occurred)
