nextcloud_ynh
nextcloud_ynh copied to clipboard
Nextcloud aborts file downloads from samba external storage after 1GB
Nextcloud aborts the downloading of a file after 1GB, if it is on an external samba storage. When I download large files from the local storage via nextcloud - everything works fine. I thought it is due to the proxy_buffering:
By default, downloads will be limited to 1GB due to proxy_buffering and proxy_max_temp_file_size on the frontend.
but setting proxy_buffering off;
in /etc/nginx/.../nextcloud.conf
and even nginx.conf
did not help.
I also checked the logs, but nothing stands out:
nginx/xxx-access.log:174.11.2.119 - - [05/Sep/2019:16:02:41 +0300] "GET /nextcloud/remote.php/webdav/xxx/test3GB.mkv?downloadStartSecret=p6qwexyz12 HTTP/2.0" 200 1074641798 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
Note the 1074641798 in the request size. The file is actually ~3GB.
I have the same issue. Haven't been able to fix it nor find out where the issue is coming from
I can confirm this issue, too. For me, the limit is exactly 1,090,519,040 bytes, tried it several times.
However - and this is where things get fuzzy - I only seem to hit that limit if the download takes longer than a few minutes (I don't know exactly how long). In other words, if you are fast enough, you can download large files normally, I just don't know how fast and why this happens. As soon as the timeout is exceeded, the limit seems to be 1GB.
In my case, I tried to download the same ~18.5GB file with a 5 MBit/s limit, and it failed always at the 1GB limit. Then, I downloaded the same file without speed limit (got ~290 MBit/s) and it worked normally.
Update: It seems the issue has something to do with the smbclient
that NC uses when an external storage is configured using SMB/Cifs. If I do mount the same directory in the OS by myself (using mount.cifs) and then configure an external storage to use that local folder, the downloads seem to be working normally.
@MrShoenel, same for me
I'm on nextcloud 23.0.1 and have the same issue. Download of files which are stored on smb/cifs times out (download size at that point is around 500 mb). Nextcloud is behind a nginx proxy and disabling buffering doesn't have an influence. I also increased the timeout of the share according to https://github.com/nextcloud/server/pull/17258 but that didn't change anything.
@XueSheng-GIT see my last comment for a working workaround, should that be an option for you. I have been using it since then without problems. For example, mount your network share under /mnt/share
, and then configure an external storage in NC using the type Local and the path as configuration.
Thanks for your suggestion! My issue was solved already: https://github.com/nextcloud/server/issues/31308#issuecomment-1048678975 Seems I forgot to mention this in this report, sorry.
Thanks for reporting your issue is solved :) I close this ticket