moodle-tool_objectfs icon indicating copy to clipboard operation
moodle-tool_objectfs copied to clipboard

Incomplete files getting to S3

Open peterspicer-catalyst opened this issue 6 years ago • 0 comments

We have a client using this plugin with S3 to offload files.

The issue is that, on occasion, files get uploaded successfully to the Moodle, its size is properly recorded and while the file stays on disk, it will be served correctly - but very occasionally the file will be damaged in transit to S3.

What seems to happen is that the copy() call is returning true, but the file itself is truncated - the cases we've seen thus far end up being cropped to some arbitrary multiple of 4KB. The files in question are under 5MB.

Of course, the file is logged in Moodle correctly, and it won't send further duplicates to S3 because as far as it's concerned, it's already there.

Our client is not running the most recent version of the plugin (we're on 3c05eb0a7d9a2e9399c415beb0929a7b015c2a7b), but I think the same problem would occur because the files are still under 5MB and still hit copy() which seems to be failing.

Is there something I'm missing? (Bonus fact: the client has several Moodles, all with the plugin and only one Moodle appears to be failing and then only sporadically.)

peterspicer-catalyst avatar Feb 11 '19 15:02 peterspicer-catalyst