What 524 means
Unofficial, used by Cloudflare. Cloudflare connected to the website’s own server, but the server didn’t send an HTTP response before Cloudflare’s timeout. At the time of writing, Cloudflare’s docs give a default of 125 seconds.
When servers send it
For slow requests: big reports, exports, slow database queries, or an overloaded server.
Common causes
- A long-running request such as a large export or query.
- An overloaded origin server.
- A request waiting on a slow third-party service.
How to fix it as a developer
- Make slow requests faster, or move them to a background job and poll for the result (return 202 Accepted).
- Send long-running exports through a DNS-only (grey cloud) subdomain.
- Enterprise plans can raise the timeout. Other plans can’t.
How to fix it as a visitor
- Try again later. What you asked for may still be being processed, so don’t repeat a payment or order without checking first.
Related codes
- 504 Gateway Timeout: A proxy or load balancer gave up waiting for the server behind it to reply.
- 522 Connection Timed Out: Cloudflare couldn’t connect to the website’s server in time.
- 202 Accepted: The request has been accepted for processing later, but it hasn’t been done yet.
- 408 Request Timeout: The server gave up waiting for the client to finish sending its request.
Where it’s defined
524 isn’t in any RFC or the IANA status code registry. It’s used by Cloudflare. Reference: Cloudflare docs: error 524.
Other 5xx codes
500 Internal Server Error · 501 Not Implemented · 502 Bad Gateway · 503 Service Unavailable · 504 Gateway Timeout · 505 HTTP Version Not Supported · 511 Network Authentication Required · 520 Web Server Returned an Unknown Error · 521 Web Server Is Down · 522 Connection Timed Out · 523 Origin Is Unreachable · 525 SSL Handshake Failed · 526 Invalid SSL Certificate
Or search them all in the HTTP status code list.