Here’s the simplified support post with the guidance sections removed:
## The Basics
* Nextcloud Server version _(e.g., 29.x.x)_:
- `31.0.0`
* Operating system and version _(e.g., Ubuntu 24.04)_:
- `Kubernetes (deployed via Nextcloud Helm chart)`
* Web server and version _(e.g, Apache 2.4.25)_:
- `Apache (default from Nextcloud Helm chart)`
* Reverse proxy and version _(e.g. nginx 1.27.2)
- `HAProxy (behind Ceph-rgw for S3 storage)`
* PHP version _(e.g, 8.3)_:
- `Default from Nextcloud Helm chart`
* Is this the first time you've seen this error? (Yes / No):
- `Yes`
* When did this problem seem to first start?
- `When attempting to upload large files`
* Installation method _(e.g. AlO, NCP, Bare Metal/Archive, etc.)_
- `Kubernetes using official Nextcloud Helm chart (https://github.com/nextcloud/helm)`
* Are you using CloudfIare, mod_security, or similar? _(Yes / No)_
- `No`
### Summary of the issue you are facing:
I'm experiencing intermittent SSL connection errors when uploading large files to Nextcloud using an S3 backend (Ceph-rgw behind HAProxy). The error only occurs on some parts during multipart uploads, not all of them. What's interesting is that using s3cmd from the same K8S cluster to upload the same file works consistently without errors, suggesting the issue is specific to how Nextcloud handles S3 connections.
### Steps to replicate it (hint: details matter!):
1. Deploy Nextcloud using the official Helm chart with S3 storage backend
2. Configure S3 backend to use Ceph-rgw behind HAProxy
3. Attempt to upload a large file (>2GB)
4. Observe that some parts of the multipart upload fail with SSL_ERROR_SYSCALL
### Log entries
#### Nextcloud
Error executing "UploadPart" on "https://[s3-endpoint]:[port]/nextcloud/urn%3Aoid%3A1750332?partNumber=6&uploadId=2~d1jWrZ2-uYyBXoH_flOcFe-h_u7FK0C"; AWS HTTP error: cURL error 35: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to [s3-endpoint]:[port] (see libcurl - Error Codes) for https://[s3-endpoint]:[port]/nextcloud/urn%3Aoid%3A1750332?partNumber=6&uploadId=2~d1jWrZ2-uYyBXoH_flOcFe-h_u7FK0C\n- Part 12
### Configuration
#### Nextcloud
S3 configuration in config.php:
```php
$CONFIG = array (
'objectstore' => array(
'class' => '\\OC\\Files\\ObjectStore\\S3',
'arguments' => array(
'bucket' => 'nextcloud',
'autocreate' => true,
'key' => 'key',
'secret' => 'secret',
'hostname' => 'hostname',
'port' => 6780,
'use_ssl' => true,
'use_path_style' => true,
'uploadPartSize' => 104857600,
'timeout' => 60,
)
)
);
HAProxy Configuration
defaults
log global
option redispatch
retries 3
timeout http-request 300s
timeout http-keep-alive 300s
timeout queue 1m
timeout connect 10s
timeout client 3600s
timeout server 3600s
timeout check 10s
balance roundrobin
maxconn 10000
Additional Information
I’ve already verified that:
- HAProxy timeouts are set to high values (client/server: 3600s)
- The issue is intermittent - only some parts of the multipart upload fail
- s3cmd works fine from the same K8S cluster with the same file and part size
I’m wondering if:
- There’s a known issue with Nextcloud’s S3 client handling SSL connections during multipart uploads?
- Could the relatively large
uploadPartSize
(100MB) be contributing to the SSL connection issues? - Are there additional S3 client configuration parameters that could improve connection stability?
- Is there a recommended configuration for Nextcloud with S3 behind HAProxy for large file uploads?
Any guidance would be greatly appreciated!