I would also like to have some confirmationā¦ likeā¦ is it normal to have 40.000 locks in a database?
Is my locking system working good? I have around 100.000 files.
I also have 5 main directories owned by a āadminā owner and shared with the others, so everyone uploads files in that directories.
I made this choice so that the āadminā user still owns the files if someone go rogue.
Is this the reason why I have 50% of files locked ?
If you have that many locks in your database you have a serious problem. Use Redis for transactional file locking as said in the first post by @tflidd.
I get the same error message when doing a āocc files:scanā for a specific user. The error starts with:
Exception during scan: File entry could not be inserted with insertIfNotExist() but could also not be selected with getId() in order to perform an update. Please try again.
Then 21 lines with more specific errors. WhatĀ“s wrong here? How can I perform a āfile system vs. database nc_filecacheā comparison?
I get that same error too for one of my users, tried to do occ files:cleanup but it did not help (0 orphaned file cache entries deleted)
How do we go about this issue?
Yes of course, and I already did manually disable the locking state beforehand. I had this a while ago already, thatās where I started using redis, but the problem seems to persist
MariaDB says: Query OK, 0 rows affected (0.01 sec)
fsck.ext4 says that everything is fine
crazy, and nextcloud even seems to show files on the web-ui that are not there on the disk - even after a occ files:scan --all
ā¦ok, I guess Iāll report it. Thanks though!
Give your services/server a bounce (restart). May just be a locked process or something untoward.
The steps outlined by @tflidd will manually force any file locks to be removed by dropping them from the database forcibly. This should normally be taken care of by the system but as is clearly demonstrated throughout the thread it isnāt foolproof.
Thank you! This worked for me. By the way, Iām running Nextcloud in an iocage jail on FreeNAS, so I changed www-data to www
By the way, your config.php file has to be in ordinary mode (not maintenance mode).