Large File Upload (2GB+), Sabre Dav Error ONLY on Shared Folders

I am running the official nextcloud 26.04 docker image. I use LDAP authentication and normally external storage SMB/CIFS shares. A reverse proxy is used to serve nextcloud.
The SabreDav error:

Sabre\DAV\Exception\BadRequest: Expected filesize of 2051569550 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 0 bytes.

occurs ONLY when uploading to a shared folder. It does work when uploading the file directly. Also I bypassed the CIFS external storage folder and use a native one to narrow down the problem.
So I guess the setup of the Nextcloud image and reverse proxy is correct.

Nextcloud version: 26.04
Operating system and version : Host Debian Bullseye
Apache Reverse Proxy : Apache 2.4.54
PHP version: 8.2.8
PHP config:
Memory limit: 2 GB
Max execution time: 3600
Upload max size: 16 GB

Log on the apache reverse proxy:

[Wed Aug 09 08:23:03.268377 2023] [proxy:error] [pid 1595] (32)Broken pipe: [client yyy.yyy.yyy.yyy:52626] AH01084: pass request body failed to 172.17.0.1:7080 (172.17.0.1)
[Wed Aug 09 08:23:03.268415 2023] [proxy_http:error] [pid 1595] [client yyy.yyy.yyy.yyy:52626] AH01097: pass request body failed to 172.17.0.1:7080 (172.17.0.1) from yyy.yyy.yyy.yyy ()

Looks like Apache images built after ~mid June 2022 introduce 1GB upload limit · Issue #1796 · nextcloud/docker · GitHub

2 Likes

This is the same behavior. The workaround mentioned in this thread does work for me. Thanks Szaimen for pointing to this post.