HTTP 416 Range Not Satisfiable vs 503 Service Unavailable
HTTP 416 (Range Not Satisfiable) is a 4xx Client Error response, while 503 (Service Unavailable) 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, 503 means that the server is temporarily unable to handle the request due to maintenance or overload. Should include a Retry-After header.
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
The server is temporarily unable to handle the request due to maintenance or overload. Should include a Retry-After header.
When You See It
During maintenance windows, server overload, or when the application pool is exhausted.
How to Fix
Wait and retry. Check the Retry-After header. Scale up servers if it's a capacity issue.
Key Differences
416 is a 4xx Client Error response, while 503 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 503: The server is temporarily unable to handle the request due to maintenance or overload. Should include a Retry-After header.
You encounter 416 when when requesting a byte range beyond the file's actual size.
You encounter 503 when during maintenance windows, server overload, or when the application pool is exhausted.
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 503 (Service Unavailable): Wait and retry. Check the Retry-After header. Scale up servers if it's a capacity issue.