Hi,
I’m trying to understand and troubleshoot how transactional file locking works in Nextcloud as it relates to Redis.
I’m running Nextcloud in Docker with Apache, Postgres, and Redis, behind a separate nginx proxy for HTTPS. The problem I’ve noticed is that if I make lots of filesystem changes in a row (like, for example, deleting a folder with lots of items and then immediately recreating it with a fresh set of files), my sync client picks the changes up and hammers the server with requests. This causes many files to become locked in Postgres until I delete the locks manually in the database. I wasn’t originally using Redis to try to solve this problem, but have since added it to try to address it.
The docs are a bit vague in this aspect, but I was under the impression that Redis is a lot more reliable with regards to transactional file locking, and that Postgres isn’t used for locking files if Redis is present. Yet my installation is creating locks in the database still.
Is my understanding of how this works incorrect? And if not, how should I set about troubleshooting this problem?
Thanks for any advice you can offer.
–
Nextcloud version (eg, 12.0.2): 13.0.2
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04 (containerized using Docker)
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.10 (Debian)
PHP version (eg, 7.1): 7.1.17
$ cat app/redis.config.php
<?php
$CONFIG = array (
'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => 'redis',
'port' => 6379,
),
);
$