Erreur 413 Request Entity Too Large


I use rclone to upload some files via webdav, but I get this error for large files. I tried to change these settings in php.ini :

upload_max_filesize = 500M -> 16G
post_max_size = 500M -> 16G
max_execution_time = 300 -> 3600
max_input_time = 300 -> 3600

But it had no effect. I’ll stick the whole log rclone on you, maybe it will speak to you more than to me :wink:

<title>413 Request Entity Too Large</title>
<h1>Request Entity Too Large</h1>
The requested resource does not allow request data with PUT requests, or the amount of data provided in
the request exceeds the capacity limit.
<address>Apache/2.4.54 (Debian) Server at xxxxxxxxx.xx Port 443</address>
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="">
  <s:message>Taille du fichier attendue : 1494290287 octets mais taille du fichier lue (depuis le client Nextcloud) et écrit (dans le stockage Nextcloud) : 0 octet. Cela peut être un problème de réseau au niveau du client ou un problème de stockage au niveau du serveur.</s:message>
</d:error>: 413 Request Entity Too Large

Thank you in advance for your help.

1 Like

I’ve got it!
After various tests, it turned out that my uploads were limited to exactly 1GB. It was the LimitRequestBody parameter, the limiting factor.

So I added at the end of my “nextcloud-le-ssl.conf” file

LimitRequestBody 0

In my case, this must be added in “nextcloud-le-ssl.conf” and not in “nextcloud.conf”.

1 Like