Server replied "413 Request Entity Too Large" to PUT

I’ve done everything I found, but still I’m getting this error in the windows client.

Server replied "413 Request Entity Too Large" to PUT ...

OR

Unable to write

But then I find these kind of errors in the config/log/nginx/error.log

client intended to send too large body: 748952021 bytes ...

When I drag and drop a file in the browser (3.3GB) it uploads just fine. It seems only to have trouble with the auto syncing using the windows nextcloud client.

I’m using the local ip address, which rules out the reverse proxy.

I have followed this:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html

Changed these values in /etc/php8/php.ini

  • memory_limit = 1024M
  • post_max_size=1024G
  • upload_max_filesize=1024G
  • max_execution_time=3600
  • max_input_time = 3600

I have checked .htaccess and .user.ini for similar variables, but didn’t find any.
Whenever the container gets an update, these values reset, which is quite annoying. Just mentioning this for testing purposes.

I’m using the latest image and fresh install: https://docs.linuxserver.io/images/docker-nextcloud
I have tried to add these env variables in my docker yaml:
- PHP_UPLOAD_LIMIT=1024G
- PHP_MEMORY_LIMIT=1024M

I changed this value in /config/nginx/nginx.conf
(I also tried giving it 0)

  • client_max_body_size 1024G;

Also this command didn’t work inside my container:
sudo -u www-data php occ config:app:set files max_chunk_size --value 20971520

Now note, when I go into my cloud using the browser and upload a file it had trouble with (above error), it uploads fine and is there in the cloud (3.3GB file). So it seems like it’s giving errors that I can’t figure out.

I’ve been trying to get this fixed, but unfortunately I don’t know what else to try at this point.
Help would be appreciated!

I have the same problem, i can upload large files (over 1gb) from the browser but anything over 300-500MB fails from the client.

Client version: 3.6.6 macOS 10.15.7
Server version: Nextcloud 24.0.6

So basically I kind of fixed my problem, although I’m getting other errors now.
I think my problem has to do with this issue that is on Github:

The fix I did was to add this in nextcloud.cfg under [General]:
maxChunkSize=500000000

nextcloud.cfg is located in:
C:\Users\USERNAME\AppData\Roaming\Nextcloud
or easier:
%appdata%/nextcloud