Help with locked files when upload big number of files

Nextcloud version : 22.2.3
Operating system and version : 20.4.3 LTS
Apache or nginx version : latest
PHP version : 7.4.3

I have a setup which I’m not sure how to handle it.
When I upload big number of files, i get locked files, and the next or the one after it seems to be good.

Nextcloud is setup in a private network.
I can access it via HAprox (PFsense) with SSL.
I have a freenas with smb share.
Configured external storage with but redirecting root “/” folder. So no files are stored on the server it self.
Mariadb is installed and has not been modified.

Anyone has an idea on what can cause this problem.

Thank you.

There are two things:

  • for the file locking, you have to use redis for better performance
  • the database benefits enormously by setting adapted cache settings

Thanks for the reply.

I did activate APCu for memory caching is it enough or is Redis the best way to go ?
Can you give me a bit more details about the second point concerning database and adapted cache settings ?

Thanks

No, redis is specifically for the filelocking stuff.

The documentation is a good starting point:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/linux_database_configuration.html

https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/caching_configuration.html

For the database, there is tuning-server.pl and mysqltuner.sh that can check the use of the caches after the server runs for >24h and based on that suggest to increase certain caches. You should also find a few topics about this here on the forum. The parameters are a starting point, it certainly depends on your setup and usage case (number of users, number of parallel upload, larger/small files, …).