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!