The database is used for transactional file locking

Nextcloud version : 28.0.2
Operating system and version : Ubuntu 22.04.3 LTS
Nginx version nginx/1.18.0 (Ubuntu)
PHP version : 8.2.6

The issue you are facing:
Constantly getting the error in the Nextcloud Admin GUI after installing Redis and configuring:

The database is used for transactional file locking. To improve performance, please configure Memcache if available.

The output of your config.php file in /path/to/nextcloud

‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘filelocking.enabled’ => true,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ => array(
‘host’ => ‘/var/run/redis/redis-server.sock’,
‘port’ => 0,
‘timeout’ => 0.0,
),

The output of /etc/redis/redis.conf (Uncommented unixsocket info and changed port to 0):
port 0
unixsocket /var/run/redis/redis-server.sock
unixsocketperm 770

Additional commands ran:

usermod -a -G redis www-data

redis-cli ping
OUTPUT: PONG

systemctl status redis
OUTPUT:
● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-02-07 10:33:31 CET; 16min ago
Docs: https://redis.io/docs/,
man:redis-server(1)
Main PID: 4538 (redis-server)
Status: “Ready to accept connections”
Tasks: 5 (limit: 6969)
Memory: 2.6M
CPU: 1.366s
CGroup: /system.slice/redis-server.service
└─4538 “/usr/bin/redis-server 127.0.0.1:0” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “”

Feb 07 10:33:30 xxxxxxxx systemd[1]: Starting Advanced key-value store…
Feb 07 10:33:31 xxxxxxxx systemd[1]: Started Advanced key-value store.


sudo tail -f /var/log/redis/redis-server.log
OUTPUT:
4538:M 07 Feb 2024 10:33:31.101 # Server initialized
4538:M 07 Feb 2024 10:33:31.101 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
4538:M 07 Feb 2024 10:33:31.101 * Loading RDB produced by version 6.0.16
4538:M 07 Feb 2024 10:33:31.101 * RDB age 1 seconds
4538:M 07 Feb 2024 10:33:31.101 * RDB memory usage when created 0.77 Mb
4538:M 07 Feb 2024 10:33:31.102 * DB loaded from disk: 0.000 seconds
4538:M 07 Feb 2024 10:33:31.102 * The server is now ready to accept connections at /var/run/redis/redis-server.sock


sudo systemctl restart redis
sudo systemctl restart php8.2-fpm.service
sudo systemctl reload php8.2-fpm.service
sudo service nginx restart

I have been fighting with removing this warning for a while now and appreciate any ideas how to fix this. Thanks!

  • Can you check your Nextcloud Server log? It will have clues if there are Redis connection problems
  • You may want to try setting the above to 777 as a test (despite the group membership change). If that fixes you can then decide on next steps.
  • Use occ config:list system to see how your config parses for real
  • Maybe run redis-cli -s /var/run/redis/redis-server.sock --stat and do some things in Nextcloud to see if there are indications of interactions

Thanks for the reply!

So as per your points

Can you check your Nextcloud Server log? It will have clues if there are Redis connection problems

Output:

i am receiving a few errors like this (I changed the names of private info):

2024/02/08 07:33:19 [error] 19250#19250: *36 access forbidden by rule, client: [IP-ADRESS], server: [CLOUD-URL], request: “GET /data/.ocdata?t=1707373999241 HTTP/1.1”, host: “[CLOUD-URL]”

You may want to try setting the above to 777 as a test (despite the group membership change). If that fixes you can then decide on next steps.

I tried this, and restarted redis, php and ngninx and did not remove the warning

** Use occ config:list system to see how your config parses for real **
OUTPUT(just the portion relevent to this):

    "memcache.local": "\\OC\\Memcache\\APCu",
    "filelocking.enabled": true,
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "timeout": 0
    },

Maybe run redis-cli -s /var/run/redis/redis-server.sock --stat and do some things in Nextcloud to see if there are indications of interactions

I tried this and played around on nextcloud but didnt see any changes other than requests increasing

------- data ------ --------------------- load -------------------- - child -
keys mem clients blocked requests connections
0 852.77K 1 0 0 (+0) 1
0 852.77K 1 0 1 (+0) 1
0 852.77K 1 0 2 (+1) 1
0 852.77K 1 0 3 (+1) 1
0 852.77K 1 0 4 (+1) 1
0 852.77K 1 0 5 (+1) 1
0 852.77K 1 0 6 (+1) 1
0 852.77K 1 0 7 (+1) 1
0 852.77K 1 0 8 (+1) 1
0 852.77K 1 0 9 (+1) 1
0 852.77K 1 0 10 (+1) 1
0 852.77K 1 0 11 (+1) 1
0 852.77K 1 0 12 (+1) 1
0 852.77K 1 0 13 (+1) 1
0 852.77K 1 0 14 (+1) 1
0 852.77K 1 0 15 (+1) 1
0 852.77K 1 0 16 (+1) 1
0 852.77K 1 0 17 (+1) 1
0 852.77K 1 0 18 (+1) 1
0 852.77K 1 0 19 (+1) 1

Any more ideas? Or could the error in the log be the culprit?

This looks like your web server log. Check the Nextcloud log. It’ll be called nextcloud.log located in your configured datadirectory unless you’ve configured it to go somewhere else.

Did you find a solution for this? I’m on 28.0.2 and as far as I can tell it’s all set up perfectly fine. I think it used to work in v26, I only got around to looking at this now and can’t find a solution. The’s nothing much in the logs and no hits on redis when monitoring through redis-cli

Unfortunately not. I ran out of time trying to get this to work and had no luck, therefore I removed everything. I am hoping I can tackle this problem once again and will be successful. I will post my outcome here