Info about file locking

Hi.
I’m still using ownCloud 9.0.2 (sadly haven’t had time to move yet), and I’m often running into file locking issues. From what I can understand no big changes have been made on this so the problem should apply…

I often find my files being locked, so I’m unable to update them either via client or via web interface. I’ve made many searches but so far the only solution (workaround would better fit) to unlock those files is to enter maintenance and clean up the file locks table.
Is this normal? Is it because I’m using DB as locking mechanism instead of Redis?

Thanks

Yes, there have been many reports lately with file-locking issues. There is now even a pull request regarding this problem (https://github.com/owncloud/core/pull/25512) so it hopefully will get better. If it is working, these changes can be ported to Nextcloud.

Using redis-cache to handle file-locking is the best solution (no major problems seen so far) and reduces the load on your database as well. With all caching mechanisms enabled, the webinterface should speed up.

So using Redis should work better, other than faster?

Well it should behave the same (theory) but looks like it has some advantages.

In general files still being locked looks more like a general issue to me. Maybe depending on an app or something.

We are a small team, ~5 users. 99.9% of oC access done via Linux desktop clients, ranging from version 1.8 to 2.2.2. I occasionally use Android client, but almost never did an upload from it (recently).
Locked files vary, sometimes files opened with vim, some LibreOffice documents… Sadly we realize a file is locked long time after last usage, so it’s even hard to remember what has been done to it to cause this condition.

Most users who switched to redis didn’t have this problem any more. I would use redis if possible and if not, open a bug report with more detailed information.

1 Like