-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permanently deleting/restoring multiple files from trash results in OCP\Lock\LockedException
#16491
Comments
Looks like you have configured Redis but gave it no job. |
This comment has been minimized.
This comment has been minimized.
I have this problem as long as I can remember. I once figured out that disabling file locking does solve this. So I usually disable it, delete the files in trash and enable it again. Simply set As this is obviously not a real solution to the problem I am also interested in other ideas. |
Sure it is, it shows how to configure Redis as backend for transactional file locking. |
@wiswedel I see, youn mean |
Even if Redis is not correctly set up, then this issue seems to be independent of Redis. |
I'd like to confirm I have the same issue with the trashbin, and I don't believe it's Redis since I don't have that setup. I use APCu for memcaching and have no memcache lock setup in my config. By adding |
Possibly related: #12281 gixxxerg wrote #12281 (comment)
|
I am coming here from issue #16665 When I decide to delete multiple files from the trash they aren't removed. The turning icon keeps looping infinitely; I do not get an error message. Refreshing the page and then deleting files by single works. I use Raspian/Debian 10, PHP 7.3, 10.3.15-MariaDB, Apache 2.4 and Nextcloud 16.0.3 without having upgraded from a previous version. |
Yeah, that was the exact same issue I was having. I don't know exactly what the issue is but the workaround I used that was listed above was to add |
I just tested to delete files one by one. Then it seems to work fine. Just when I select multiple files (two is already enough) I get this error. |
There seem to risks associated with disabling file locking. I am now also receiving a "423 Locked" error from a GET request in the Windows desktop app as indicated there: I have also been trying to rsync my data, however the rsync process gets stuck. Perhaps this is because some files are blocked or currupted. |
This comment has been minimized.
This comment has been minimized.
Having the similar problem when recovers the file, click on the button one by one gives no problem but once in batch, the error occurs. |
I setted up Redis, but it is not resolved the issue. Could you please check it? |
@skjnldsv Could you maybe take a look? |
@wiswedel I'm really not the locking expert ;) |
@skjnldsv But the triaging expert 🦸♂️ |
This comment has been minimized.
This comment has been minimized.
The only 'fix' I found is temporarily disable locking on the config.php |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Yes, same here when using Object Storage (S3 compatible) as primary storage at least. otherwise, a lot of |
I have read the lock exception again and I have noticed that nextcloud is trying to acquire a lock on the entire
If it does this for every delete command then it will obviously clash when deleting multiple files.. I think everyone who has the 'versions' plugin enabled might have this locking issue when deleting multiple files.
Possible 'versions' plugin bugThe versions plugin is probably causing the locking issues Hey Nextcloud team (@wiswedel @rullzer @icewind1991)... Given the response, I think this is the issue, would you guys be able to take another look at this potential bug? 😃 |
Good work! |
I can also confirm the solution. And this behavior has been bothering me from about Nextcloud 16 to my current Nextcloud version 20.0.10. Perhaps my situation will help isolate the error: A local folder is shared with a group in which 70 people have full access to the files and folders. Works without problems. Then move many files to the recycle bin. Deleting individual files from the recycle bin works. Deleting multiple files from the recycle bin always fails.
My workarounds:
|
OCP\Lock\LockedException
- Versions app related
OCP\Lock\LockedException
- Versions app relatedOCP\Lock\LockedException
Please note; this also occurs when trying to restore, not only deleting, multiple files. |
Yes I can also confirm @acsfer |
… from trash fixes issue nextcloud#16491 Signed-off-by: Sven Strickroth <email@cs-ware.de>
… from trash fixes issue nextcloud#16491 Signed-off-by: Sven Strickroth <email@cs-ware.de>
… from trash fixes issue nextcloud#16491 Signed-off-by: Sven Strickroth <email@cs-ware.de>
I just updated to 22.2.1 and the problem seems to be gone. Unfortunately, I just recently updated my operating system so there might be somethin else affecting this. Still, filelocking is still enabled in config and apcu deamon is running. //EDIT: It still improved a lot. Before I was not able to delete any multiple files. |
… from trash fixes issue #16491 Signed-off-by: Sven Strickroth <email@cs-ware.de>
… from trash fixes issue #16491 Signed-off-by: Sven Strickroth <email@cs-ware.de>
Even with NC 22.2.6, Redis being used as memcache for locking, and filelocking disabled, I'm still getting exceptions when trying to permanently delete many files and directories at once. Is there any workaround, or are we just stuck with undeletable files? |
Maybe deleting on disk and then scanning via occ scan would work? |
I will write here, even though there are several other issues about this same topic. All of these issues are closed: #20362 #28720 #28438 My problem is that the problem still exists. After some updates about a year ago the problem got far less disturbant as the frequency reduced significantly. On average the "OCP\Lock\LockedException" occures once for every 15-20 files. I am currently running nextcloud 25.0.1 and have all apps up to date. When the error occurs I see the folowing entry in the log:
I don't see any activity in any of these similar issues referenced above. Was this issue really closed? Any others still having problems here? |
Yeah, After the update that made this be closed, it got better, but there is still issues. I have not tried empty everything in the trash at once, but when selecting multipile files I get error. Weird to me is that I have not been able to conclude on how many files I have to delete from trash at the same time for the error to come, because it doesnt seem to be the same. Sometimes I can delete 40 files at the same time just fine, others I do 15 and it doesnt. Also, if I keep deleting a bunch at the time over and over with an amount that works over and over it eventually start coming with errors again. And sometimes when do that, I stop being able to delete any files at all from there at all, not even a single one, it happened yesterday, restarting the docker did not work, but after waiting a day untill today, I could delete stuff in trash bin again. But then when repeating deleting a bunch, it has now happened again. For refference, if it matters I am running the "linuxserver" docker on unraid. Nextcloud 24.0.6 My error is similar to the person above:
|
That above^ continued: I did some more testing, when I do it when I am not at the home network, it lets me delete much more at the time without getting the error, its much rarer. And it did never lock up. I have always on VPN to the nas btw. I am guessing the reason might be something to do with latency or something, maybe longer latency makes it work fine? I am just guessing. |
@TheMihle I have the same setting and problem than you. My guess is, actually, that the server is not fast enough to unlink the files before moving ahead and some race condition happens when managing the lock. |
Should we open a new issue or will this issue be reopened? |
I tried to delete stuff again, I am still getting error messages, but it allows me to delete more things at once before it errors, and it didnt look up. The error messages I get is also no longer the "LockedException" error. I am getting "Too many connections" error to the database and some others instead in logs. So I will increase that, but I dont have more files in deleted files to test after that. Its works better than it did tho. (DB max connections was on 100, but I am increasing it) I am running the 25.0.6 now, not sure what update changed it, but sure wasnt the update that was mentioned here. |
The problem is gone on my side. I noticed it after updating to 25.0.6 but I also did quite a few changes to my server (swap, network setup, virtual machines, nextcloud apps). In the end I can't tell what of these changes influenced this behavior. Also after updating to 26.0.0 and 26.0.1 I don't have any issues to delete files from trash any more. Also, it's significantly faster. ~30 files now take about 3 seconds to delete from tash. Before, it did only delete one file per minute (roughly measured). I also don't see log entries any more while deleting files from trash. |
Steps to reproduce
Expected behaviour
All files are removed without errors.
Actual behaviour
I see the error "Fehler beim Entfernen von Dateien aus dem Papierkorb".
Sometimes a few files are removed (from the disk and from the list). On all still visible files there are spinners visible.
I had similar problems with ownCloud before, however, there such errors were fixed.
Server configuration
Operating system: Debian 9.8
Web server: Apache 2.4
Database: MariaDB 10.1.38
PHP version: 7.3.7
Nextcloud version: 16.0.3.0 (was also in 16.0.1.1)
Updated from an older Nextcloud/ownCloud or fresh install: Upgraded from ownCloud 10.0.1 to NC12,13,14,15,16
Where did you install Nextcloud from: https://nextcloud.com/install/#instructions-server, tar.bz2
Signing status:
Signing status
List of activated apps:
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Client configuration
Browser: Mozilla Firefox 68.0.1 (but also experienced with older Firefox)
Operating system: Win 7 x64
Logs
Web server error log
Web server error log
Nextcloud log (data/nextcloud.log)
Nextcloud log
Browser log
Browser log
The text was updated successfully, but these errors were encountered: