Nextcloud Desktop Sync Big Files

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 33.0.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04.4 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • Whatever is included in aio
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx 1.29.1
  • PHP version (e.g, 8.3):
    • Whatever is included in aio
  • Is this the first time you’ve seen this error? (Yes / No):
    • In this install yes
  • When did this problem seem to first start?
    • Has been happening since the install
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Cloudflare

Summary of the issue you are facing:

I am using the Desktop Client to sync files from my MacBook to my Cloud. Most files work, even large ones, but some don’t. The Desktop Client shows this error:

On the server side, in the logs I can see this error all over the place:

BadRequestExpected filesize of 104857600 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 54018048 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.

Are you sure your connection is stable and fast?

How many files do you want to transfert? I know that Nextcloud doesn’t like when you want to transfert hundreds of file at once ?

In your php.ini file, have you checked the value of max_file_uploads, upload_max_filesize and post_max_size?

Are there some patterns as to file size?

Cloudflare has two big limitations: 100MB (which can be worked around with chunking configuration) and maximum request time.

What happens when you upload the same file via the web UI?

All of the files have been over 100MB, and I also know about the cloudflare limit, but because of the chunking, I thought that it could not be the problem. Request time could have been the issue. It was the first time syncing all my documents (roughly 50GB), so it may have been the amount of files (thousands) in combination with slow transfer times. I actually didn’t try over the web UI. I also didn’t want to mess with the php.ini because I am using nextcloud aio. But for some reason, it just worked. I assume, it just retried over night a couple of times and eventually it worked. Sorry that I can only make assumptions for everyone reading in the future.