biigle / user-storage

:m: BIIGLE module to offer file upload and storage for users
GNU General Public License v3.0
0 stars 0 forks source link

Error copying object larger than 5 GB #16

Closed mzur closed 10 months ago

mzur commented 1 year ago

There was an error in the ApproveStorageRequest job where a file larger than 5 GB should be copied. The error looked like this:

An exception occurred while uploading parts to a multipart upload. The following parts had errors:

 - Part 2: Error executing "UploadPartCopy" on "https://openstack.cebitec.uni-bielefeld.de:8080/BiigleUserStorageApproved/user-xxx/file.mp4?partNumber=2&uploadId=2~mRjziMK3iHyT_UrSObYQ7UrmeruEPfU"; AWS HTTP error: Client error: `PUT https://openstack.cebitec.uni-bielefeld.de:8080/BiigleUserStorageApproved/user-xxx/file.mp4?partNumber=2&uploadId=2~mRjziMK3iHyT_UrSObYQ7UrmeruEPfU` resulted in a `404 Not Found` response:
 <?xml version="1.0" encoding="UTF-8"?><Error><Code>NoSuchKey</Code><BucketName>BiigleUserStorageApproved</BucketName><Re (truncated...)

Try to reproduce this and fix the issue.

mzur commented 1 year ago

I tracked the error down to possible issues with the AWS SDK or RGW S3. More information here: https://github.com/aws/aws-sdk-php/issues/2704

mzur commented 1 year ago

The AWS SDK maintainers won't consider an update and I got no response from the RGW maintainers.

As a workaround, we should detect files larger than 5 GB, containing spaces in their names, here. If such a file is detected, it should be excluded from the list of added files and a warning message should be displayed (something like "Spaces in filenames can sometimes lead to errors. Please remove all spaces from the filenames.").

mzur commented 1 year ago

We could also automatically replace all spaces with _ for these files (while showing a notice about this to the user). I'm raising the priority because I had a few more of these cases and it's very time consuming to fix manually.

mzur commented 10 months ago

@lehecht Whenever you have time for bugfixing again, could you please prioritize this issue? Replacing spaces with _ in JS should be easy to implement.