Nextcloud external storage download large file

Nextcloud version (eg, 16.0.6):
Operating system and version (Ubuntu 18.04.3 LTS):
Apache or nginx version (nginx/1.14.0 ):
PHP version (7.1):

i have problem with download large files from external storage (smb). When is large file in folder for “nextcloud data - defined during installation/configuration” is not problem download file large than 1GB.
When im trying download file large than 1GB from external storage (share smb folder from local network) everytime downloading stop on 1 082 130 432 byte (cca 1GB).

Can anyone advise me what I forgot to set up?
Thanks for help and I apologize for my English.

I have this exact problem. Sharing files larger than 1GB that have been stored inside the Nextcloud data direction download fine.

The same file stored on a SMB share and downloaded/shared via Nextcloud stops at 1GB and won’t go any further.

Clearly hitting some limit here but I don’t know what.

Any ideas?

Probably there is some limit in samba itself active? Does it work when e.g. mounting the samba share directly to the system and copy/download from there?

Which samba server system/OS do you guys use?

Yes, no problem directly via SMB to another host on the same LAN. Just via SMB configured as an External Drive in Nextcloud.

It’s always stops bang on 1GB into the download.

I’ll check on versions and post here.

What is the maximum upload size you allowed in Nextcloud? Not sure if this can limit external drive downloads as well, should not, but just in case.

Probably worth disclosing now @MichaIng that I’m using DietPi 6.28 with version 4.9.5 of SAMBA :slight_smile:

The max size upload size are the default that’s set in DietPi. Haven’t touched those settings. If I store the file directly inside Nextcloud it downloads fine. Just not when the file is stored on a CIFS/SMB share and downloaded through Nextcloud using External Storage options. All signs point to a SAMBA limitation somewhere but yet I can read/write files >1GB directly over SMB too the same location without issue.

DietPi automatically raises the allowed upload size to the max size that PHP can handle, based on PHP implementation and CPU architecture. However Nextcloud has an internal limit of 512M that resets on every update (at least this was the case when I tried the last time). Both usual found values do not match to the 1GiB limit, but just to rule it out for sure… Seems the Nextcloud GUI option to adjust this value has changed with one of the recent versions… Please try:

G_CONFIG_INJECT 'upload_max_filesize' 'upload_max_filesize = 4G' /var/www/nextcloud/.user.ini
G_CONFIG_INJECT 'post_max_size' 'post_max_size = 4G' /var/www/nextcloud/.user.ini
  • This is DietPi-only functions btw, to alter or add those setting or uncomment commented ones, based on if they are present already, if others read this :wink:.

For reference:

There are some other limits mentioned, e.g. if you have a reverse proxy in front of the actual webserver.

Done but unfortunately the problem still remains. Get’s to 1GB and then hangs. Internal network, externally downloaded - doesn’t seem to make a difference.

Same file uploaded into Nextcloud’s repository first downloads fine internally and externally.

I don’t know if this adds value but I switched the External Storage option from SMB to FTP pointing at the same source and I can share out and download the same file and all files >1GB fine using Nextcloud.

Really feels like I’m hitting some SMB problem here.

Any ideas of any next steps @MichaIng?

Is there anything in Samba log or Nextcloud log, journalctl or dmesg?

Hello All. I am facing the same problem. Is this issue resolved? Below is my observation:

  1. I am having the exact same issue. My download from nextcloud stops at 1 GB from an external configured storage SMB/ CIFS. However, I am able to upload more than 1 GB to the same storage.

  2. I have two setup of nextcloud. One is a docker container and another one is the native installer on ubuntu 20 server.

  3. I don’t see this problem with the docker version. I can download the same file ( > 1GB) from the docker setup, but fails from the native ubuntu server setup. Docker is also running on ubuntu 20 server.

  4. I have updated all the php and memory size(s) in the config files.

Hi all,
I do have the exact same problem like @Alok_Chatterji. Is there any news on that issue?

Maybe you can open an own thread with more details. Bu if you use SMB on the same server than your Nextcloud you can perhaps use Local instead of SMB/CIFS for External Storage. Maybe it solves your problem.

I got rid of that installation. I am now using Proxmox with a Nextcloud turnkey lxc and somehow I don’t have that problem.