[SOLVED] NEXTCLOUD : Upload de gros fichier (100Mo) impossible

My YunoHost server

Hardware: Raspberry Pi 3 at home
YunoHost version: 3.6.5.3
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen | …
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : YES : The last Nextcloud upload didn’t work because of the php 7.4 thing, so I had to uninstall Nextcloud, remove php7.4 and reinstall Nextcloud in order to make it work

Hi,
As described above, the last Nextcloud upload didn’t work because of the php 7.4 thing. I had to uninstall Nextcloud, remove php7.4 and reinstall Nextcloud in order to make it work again.

The only thing is that, since this workaround and the reinstallation of the Nextcloud app, I have a problem whenever I need to upload a large file (110MB) from my mobile phone client.

The file is being uploaded until 100% and then the upload restarts again for a couple of time until the client just stops trying to upload it.

Here is an example of the log from Nextcloud (there is one log like this each time the client tries to upload the file):

[webdav] Fatal: Sabre\DAV\Exception\BadRequest: expected filesize 105760183 got 16580608 at <<closure>>

0. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 156
   put(null)
1. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
   createFile("20-01-10 06-46-22 5567.mov", null)
2. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
   createFile("Shared multimed ... v", null, null)
3. <<closure>>
   httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
4. /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
   call_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
5. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
   emit("method:PUT", [Sabre\HTTP\Requ ... }])
6. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
   invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
7. /var/www/nextcloud/apps/dav/appinfo/v1/webdav.php line 80
   exec()
8. /var/www/nextcloud/remote.php line 163
   require_once("/var/www/nextcl ... p")

PUT /nextcloud/remote.php/webdav/Shared%20multimedia/Gabriel/Parle/20-01-10%2006-46-22%205567.mov
from 10.0.242.193 by charlyc at 2020-01-10T05:16:29+00:00

The thing is that, I remember that I had this issue when I installed my Yunohost (a year and a half ago) and that I found a trick online in order to fix it.

At that time I’ve found a solution online and I noted it on my Yunohost-notes :
INSERT INTO `oc_appconfig` ( `appid` , `configkey` , `configvalue` ) VALUES (‘files’, ‘max_chunk_size’, ‘524288000’);

The problem is that : I don’t remember how I entered this command exactly :frowning:
I guess I should open mysql, select the right database, etc.

It would be great if someone could provide my some proper guidance here.

Update :
I managed the pass this command in the right database but still have the same issue to update any large file withe the same error message.

[webdav] Fatal: Sabre\DAV\Exception\BadRequest: expected filesize 105760183 got 16580608 at <>

Thanks again for your kind help,
Charly

This post recommand to disable http2 in Nginx.

Bad idea ?

Thanks !

Hi,

Can you check the contents of /etc/nginx/conf.d/${YOUR_DOMAIN}.d/nextcloud.conf? You should have this in there:

  # Set max upload size
  client_max_body_size 10G;
  fastcgi_buffers 64 4K;

If yes, disabling http2 won’t hurt. You can try it.

Hello,

Thanks for your answer.

So, before reading your message and after I tried (too) many workarounds on my Yunohost server, I burned a backup image of the SD card (that was 2-3 days old, so the problem was supposed to be there already) in order to start again from a fresh and clean (minus the big files upload problem) server.

I tried to upload the very same file and… It worked.
I really don’t understand why and how but it just worked without any weird log or whatsoever.

Thanks anyway for you help,
Thanks to the Yunohost team for its work.

Best

Just for your information :
It seems that the problem was coming from the SD card…