Failure modes with large files

      Last updated July 21, 2020

    If you haven't enabled Segmented Caching, you may encounter the following failure modes when working with large files.

    Maximum file size limits

    If the response from the origin has a Content-Length header field that exceeds the maximum file size, Fastly will generate a 503 Response object too large response to the client. If no Content-Length header field is returned, Fastly will start to fetch the response body. If, while fetching the response body, we determine that the file exceeds maximum object size, we will generate a status 503 Response object too large response to the client.

    If no Content-Length header field is present and the Streaming Miss feature is enabled, Fastly will stream the content back to the client. However, if while streaming the response body Fastly determines that the file exceeds the maximum cacheable file size, it will terminate the client connection abruptly. The client will detect a protocol violation, because it will see its connection close without a properly terminating 0-length chunk.

    Origin read failures

    If reading the response body from the origin fails or times out, the problem will be reported differently depending on whether or not you’ve enabled Streaming Miss to act when the object is fetched. Without Streaming Miss, a 503 response will be generated. With Streaming Miss, however, it is already too late to send an error response since the header will already have been sent. In this case, Fastly will abruptly terminate the client connection and the client will detect a protocol violation. If the response was chunked, the client will see its connection close without a properly terminating 0-length chunk. If Content-Length was known, the client will see the connection close before the number of bytes given.

    Back to Top