moodle-tool_objectfs
moodle-tool_objectfs copied to clipboard
Uncaught exception from the proxy range request
Have seen this a few times in the logs (client has NewRelic)
Uncaught exception 'file_exception' with message 'error/Range request to URL https://S3BUCKETNAME.s3.eu-west-2.amazonaws.com/aa/bb/aabbccddeeff00112233445566778899aabbccdd?response-content-disposition=inline%3B%20filename%3D%22Some_Document.pdf%22&response-content-type=application%2Fpdf&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&... failed with HTTP code: 416 Requested Range Not Satisfiable.
Details: <Error><Code>InvalidRange</Code><Message>The requested range is not satisfiable</Message><RangeRequested>bytes=4815629-4815629</RangeRequested><ActualObjectSize>4815629</ActualObjectSize></Error>' in /var/www/site/admin/tool/objectfs/classes/local/store/s3/client.php:681
(Obviously I have redacted things that aren't relevant; credentials, host id, request id etc)
The range being requested by the client class is indeed invalid; the file is 4815629 bytes long and the S3 client is apparently making a request for the byte after the end of the file (since ranges are 0-based)
This still happens periodically on files, no clear pattern to them. Presigned URLs are not enabled, proxy range requests are enabled.
The file doesn't appear to be prevented from being sent to the user, at least not in any pattern we can determine - we have had no reports of this, merely seeing it in the NewRelic logs.