HTTP 416 Range Not Satisfiable vs 524 A Timeout Occurred
HTTP 416 (Range Not Satisfiable) is a 4xx Client Error response, while 524 (A Timeout Occurred) is a 5xx Server Error response. 416 indicates that the server cannot serve the requested byte range. The Range header value is outside the resource's size. In contrast, 524 means that cloudflare-specific. A TCP connection was established but the origin didn't respond with an HTTP response in time.
Description
The server cannot serve the requested byte range. The Range header value is outside the resource's size.
When You See It
When requesting a byte range beyond the file's actual size.
How to Fix
Check the Content-Range in the response for the actual file size and adjust your Range header.
Description
Cloudflare-specific. A TCP connection was established but the origin didn't respond with an HTTP response in time.
When You See It
When a request to the origin takes longer than Cloudflare's 100-second timeout.
How to Fix
Optimize slow endpoints. Move long-running tasks to background jobs.
Key Differences
416 is a 4xx Client Error response, while 524 is a 5xx Server Error response.
HTTP 416: The server cannot serve the requested byte range. The Range header value is outside the resource's size.
HTTP 524: Cloudflare-specific. A TCP connection was established but the origin didn't respond with an HTTP response in time.
You encounter 416 when when requesting a byte range beyond the file's actual size.
You encounter 524 when when a request to the origin takes longer than Cloudflare's 100-second timeout.
When to Use Which
For 416 (Range Not Satisfiable): Check the Content-Range in the response for the actual file size and adjust your Range header. For 524 (A Timeout Occurred): Optimize slow endpoints. Move long-running tasks to background jobs.