Primary Storage S3, Files large more than 4GB

Hi,

I have a server with Nextcloud 16 and a Bucket S3 as primary storage.

When try upload files large more than 4GB nextcloud show error.

In navigator show “error 503”
In desktop app show “file size is unexpected”

In the logs show error:

´´´
“Exception”:“Aws\S3\Exception\S3MultipartUploadException”,“Message”:"An exception occurred while uploading parts to a multipart upload. The following parts had errors:\n- Part 1: Error executing “UploadPart” on “https://XXXXXXXXX/XXXXXXXXX/urn%3Aoid%3A34329?partNumber=1&uploadId=2~8JZkiOiCf91BjQf1cQd-1aN5YJQFCVS”; AWS HTTP error: Client error: PUT https:\/\/XXXXXXXXX\/XXXXXX\/urn%3Aoid%3A34329?partNumber=1&uploadId=2~8JZkiOiCf91BjQf1cQd-1aN5YJQFCVS resulted in a 400 Bad Request response:\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>XAmzContentSHA256Mismatch</Code>XXXXXXXXX< (truncated…)\n XAmzContentSHA256Mismatch (client): - <?xml version=\"1.0\" encoding=\"UTF-8\"?>XAmzContentSHA256Mismatch</Code>XXXXXXXXX</BucketName>
´´´
The bucket S3 is in CEPH, and i can upload files up to 50GB without problems.

I configured in PHP:

  • upload_max_filesize = 32G
  • max_file_uploads = 5000
  • max_execution_time = 7200
  • max_input_time = 7200

Kind regards.

I am seeing the same symptoms on the FPM and FPM-ALPINE 16.04 Docker images. Have tried increasing PHP timeout and memory limit values. Also, the web app shows: Error when assembling chunks, status code 504 similarly to what has been reported here: Error when assembling chunks, status code 504). The worst part is when the upload fails, the chunks that are written are not removed therefore we have a number of large partial uploads without a great way to purge them.

If I switch to local storage, I still get the 504 error but the files at least upload. Would prefer S3 though.

Similar issue has also been reported here: https://github.com/nextcloud/server/issues/7919