# Cloudflare Error 524: A Timeout Occurred

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

524 is Cloudflare's gateway timeout. The TCP connection succeeded and the request was sent, but the origin took longer than Cloudflare's proxy timeout — 100 seconds on most plans — to start responding. The work may still finish on your server; Cloudflare just stopped waiting.

- Class: unofficial (Cloudflare)
- Retry: With backoff (idempotent requests only)
- Cacheable by default: no
- Defined in: [Cloudflare docs — Troubleshooting Cloudflare 5XX errors](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/)

## Example response

```http
HTTP/1.1 524 A Timeout Occurred
Content-Type: application/json
Content-Length: 30

{"error":"A Timeout Occurred"}
```

## Common causes

- Long-running requests: exports, reports, heavy queries.
- An overloaded origin queueing requests.

## How to fix it

1. Move long work to a background job and poll for the result (the 202 Accepted pattern).
2. Speed up the slow endpoint with better queries or caching.
3. Serve long-running operations from a hostname that isn't proxied through Cloudflare.
4. Enterprise plans can raise the timeout.

## FAQ

### How long is Cloudflare's timeout?

100 seconds for the origin to start responding, on most plans. Enterprise customers can raise it.

## Related status codes

- [504 Gateway Timeout](https://www.devkult.com/http/504.md)
- [522 Connection Timed Out](https://www.devkult.com/http/522.md)
- [202 Accepted](https://www.devkult.com/http/202.md)

Open the interactive page: https://www.devkult.com/http/524