Why Can't I Upload Large Files to Object Storage through Nextcloud?
We have configured Nextcloud to use Object Storage as an External Storage Mount but every time I try to upload a file large file (1GB+) we receive an error:
"Error when assembling chunks. Status code 504" "Can't open file"
We have checked the common workarounds known in Nextcloud, like PHP and/or nginx timeout, max_upload, etc, but none of the configurations effect the outcome of the error. The Nextcloud server works with uploads using the AWS S3 credentials, but NOT with Linode's Object Storage S3 (running on the exact same server with same config).
We found that it could be related to php memory limits or the way the app handles the uploading process by splitting the file into chunks. So we: a) Increased
php_memory_limit and b) tweaked the chunk files
0 (disabled) and/or set it to a bigger value on the Nextcloud configuration. The output was still the same.
For reference, here our my nginx timeout configs:
client_max_body_size 5120m; fastcgi_connect_timeout 60; fastcgi_send_timeout 4000; fastcgi_read_timeout 4000; fastcgi_buffers 8 16k; fastcgi_buffer_size 32k;
Our PHP version is 7.4.11 and our Nextcloud version is 20.0.0