Nextcloud kubernetes, files above 2.5gb get uploaded but failed when being copied from uploads folder to final destiantion

Hello everyone,

This is my first forum post after about 5 years on nextcloud usage, this service was the reason why i first got interested in linux, and it got me a lot of joy :smiley:

Currently I have installed nextcloud using the helm chart on my x86 k3s kubernetes cluster and I have an annoying problem.

My install is as follows:
I have a lenovo tiny that runs a k3s cluster and a synology nas that is used for data.
Nextcloud config/container is running on a longhorn volume(fast, nvme) and the nextcloudData on a nfs volume(1gb connection between the nas and the cluster)

My issue:
When I copy files over 2.5 gb, the file gets copied to the server, it reaches the upload folder of the user used ( /var/www/html/data/admin/uploads ) but then when getting copied to the final folder ( /var/www/html/data/admin/files ) the copy process starts, i can see on the nas how the files get copied over but it fails and gets deleted after about 2.4 gb.

The errors I get in nextcloud:


[PHP] Error: rmdir(/var/www/html/data/admin/uploads/web-file-upload-564f2875dde7dada): Directory not empty at /var/www/html/lib/private/Files/Storage/Local.php#157
DELETE /remote.php/dav/uploads/admin/web-file-upload-564f2875dde7dada
from REDACTED-BY-ME by admin at 9 Mar 2024, 13:03:38


[no app in context] Error: Could not open file
MOVE /remote.php/dav/uploads/admin/web-file-upload-564f2875dde7dada/.file
from REDACTED-BY-ME by admin at 9 Mar 2024, 13:03:38


[webdav] Error: Could not open file
MOVE /remote.php/dav/uploads/admin/web-file-upload-564f2875dde7dada/.file
from REDACTED-BY-ME by admin at 9 Mar 2024, 13:03:38

From these errors I gather that it might be some permission error, but it does not make any sens, as smaller files get copied without any issue.

I have also tried changing the values recommended by nextcloud documentation, but since the issue is after the file reaches the server, I think that they are not the issue.

My only assumption after getting through all of the above is that there is some kind of timeout for the copy process itself which because the nfs storage is slow(compared to direct volume access or longhorn) gets triggered and it fails…but I dont know.

Any help or suggestion is greatly appreciated!

Would any other logs be needed/helpfull ?