Erreur 413 Request Entity Too Large

Bonjour,

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:

<html><head>
<title>413 Request Entity Too Large</title>
</head><body>
<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.
<hr>
<address>Apache/2.4.54 (Debian) Server at xxxxxxxxx.xx Port 443</address>
</body></html>
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
  <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.
Jul

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”.

2 Likes

Awesome!!!
By the way,if you are using docker or docker-compose,suppose you have that volume:

volumes:
  - /data/next-cloud:/var/www/html

Just append LimitRequestBody 0 your host machine’s /data/next-cloud/.htaccess