Difference between plain vs docker version in view of 2GB file size limit

Hardware: Raspberry Pi 4
Operating system and version: Raspbian Linux 5.4.72-v7l+ armv7l

Nextcloud version plain install: NextCloudPi v1.30.1
PHP version plain install: 7.3.19

Nextcloud version docker install: NextCloudPi v1.23.1
PHP version docker install: _ 7.3.14_

When I install nextcloudpi via the following command:
curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | sudo bash
then I run into the 2GB file size limit. Files bigger than 2GB are uploaded. But when looking at them via the webplanel, their size is shown as “Pending”. These files are also not synchronized (dowloaded to clients) via the nextcloud client. The client seems to try to download the file again and again, but never succeeds. However, when I donwload the file via the nextcloud webpanel, it can be downloaded as a whole.

Interestingly, when I install nextcloud via docker on the same machine, I do not run into this problem. Then the file is uploaded properly, the file size is shown correctly in the web panel, and it can be downloaded via the client.

So there must be a difference between the plain and the docker version. Is there a setting in the docker version, which I can apply to the plain one, so files larger than 2GB will also work?

I prefer to run the plain version, because according to my measurements, it is slightly faster when running on a rpi4.

In the log of the plain install I can see the following errors:

Error: file_put_contents(): content truncated from 2569124126 to 2147483647 bytes at /var/www/nextcloud/lib/private/Files/Storage/Local.php#559

Exception: Return value of OC\MemoryInfo::memoryLimitToBytes() must be of the type int, float returned

You can change default size limit of 2gb in the admin panel at :4443 under nc-limit to allow larger file sizes.

nc-limit was set to 10GB in both cases, so this was not the problem.

I think it is due to the issue that kesselb refers to.

I knew it has to do with the limitations of running a 32bit OS/PHP. But since it works in docker on a 32bit OS, I thought there mit be a simple solution.

However, after reading some of the comments in that post, such as running a 64bit OS on the pi like Manjaro or Ubuntu, I’ve been experimenting with that. I’m more keen to stick with Raspbian, so I tried it with Raspbian OS 64bit.

And voila this also solves the problem.

1 Like