Getting error redis is not running but checked redis is up and nextcloud erroring

Not sure exactly what happened, I restarted apache and then nextcloud started throwing this error.

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

I checked redis is running so redis was not the issue.

php7.4-apcu:
  Installed: 5.1.20+4.0.11-1+ubuntu18.04.1+deb.sury.org+1
  Candidate: 5.1.20+4.0.11-1+ubuntu18.04.1+deb.sury.org+1
  Version table:
 *** 5.1.20+4.0.11-1+ubuntu18.04.1+deb.sury.org+1 500
        500 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main arm64 Packages
        100 /var/lib/dpkg/status

Not sure what has gone wrong.

Nextcloud version (eg, 20.0.5): 21.0.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): apache 2.4
PHP version (eg, 7.4): 7.4

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Restarted Apache2

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocr2fw9pzn5a',
  'passwordsalt' => '24QdCbdso/MTqBnT2WZwK/G620EIM/',
  'secret' => 'HnyaVGitcBtN9i8ddsd2xRaXTZo//Wjw3CNSLLG0dU8iRIqG',
  'filelocking.enabled' => 'true',
  'memcache.disributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '192.168.1.10',
    'port' => 6379,
    'timeout' => 0.0,
    'password' => 'secret',
    'dbindex' => 0,
  ),
  'trusted_domains' => 
  array (
    0 => '192.168.1.10',
    1 => 'mydomain.com'
  ),
  'datadirectory' => '/media/storage/data',
  'dbtype' => 'mysql',
  'version' => '21.0.3.1',
  'overwriteprotocol' => 'https',
  'overwritehost' => 'mydomain.com',
  'overwrite.cli.url' => 'https://mydomain.com/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.10',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'secret!',
  'installed' => true,
  'htaccess.RewriteBase' => '/nextcloud',
  'session_lifetime' => 86400,
  'session_keepalive' => true,
  'has_rebuilt_cache' => true,
  'maintenance' => false,
  'theme' => '',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => 1,
  'updater.release.channel' => 'stable',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'contact',
  'mail_domain' => 'mydomain.com',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.mydomain.com',
  'mail_smtpport' => '25',
  'mail_smtpname' => 'contact@mydomain.com',
  'mail_smtppassword' => 'secret!',
);

The output of your Apache/nginx/system log in /var/log/____:

[Sun Aug 15 21:27:45.188588 2021] [php7:error] [pid 18741] [client 192.168.1.19:55340] PHP Fatal error:  Uncaught OC\\HintException: [0]:     Memcache \\OC\\Memcache\\Redis not available for local cache (Is the matching PHP module installed and enabled?)\n\n  thrown in /var/www    /html/nextcloud/lib/private/Memcache/Factory.php on line 89

Hi @vitachaos

php7.4-apcu has nothing to do with Redis. You have to install php7.4-redis and of course the redis-server package to make it work. You can check with systemctl status redis-server if it is up and running.

thanks @bb77 for getting back , I have reinstalled php7.4-redis and then ran a2enmod proxy_fcgi setenvif an also ran a2enconf php7.4fpm

looks like, this time I got a different error now

{"reqId":"xcKKnzipv9pnXARnJxQi","level":3,"time":"2021-08-16T06:07:14+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","me ssage":{"Exception":"RedisException","Message":"Connection lost","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/Memcache/Redis.p hp","line":55,"function":"get","class":"Redis","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":441, "function":"get","class":"OC\\Memcache\\Redis","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.php","line":459, "function":"getResults","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/IntegrityCheck/Checker.p hp","line":531,"function":"storeResults","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Integri tyCheck/Checker.php","line":606,"function":"verifyAppSignature","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/www/html/nextcl oud/lib/private/Updater.php","line":288,"function":"runInstanceVerification","class":"OC\\IntegrityCheck\\Checker","type":"->"},{"file":"/var/ww w/html/nextcloud/lib/private/Updater.php","line":132,"function":"doUpgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/html/nextcloud/ core/Command/Upgrade.php","line":255,"function":"upgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/html/nextcloud/apps/bookmarks/ven dor/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->"},{"file":"/var/www/htm l/nextcloud/apps/bookmarks/vendor/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Console\\Command\\C ommand","type":"->"},{"file":"/var/www/html/nextcloud/apps/bookmarks/vendor/symfony/console/Application.php","line":273,"function":"doRunCommand ","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/apps/bookmarks/vendor/symfony/console/Applica tion.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/lib/pri vate/Console/Application.php","line":215,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/html /nextcloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/html/nextcloud/occ","line" :11,"args":["/var/www/html/nextcloud/console.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/Memcache/Redis.php"," Line":55,"CustomMessage":"--"},"userAgent":"--","version":"21.0.3.1"}

I am not sure why the last error message I postes says Connection Lost:

But I am easily able to connect.
Do you think something wrong in the redis memory used_memory_peak_perc:99.48%
if this could be the case what should I do to fix this? I am not a redis expert sorry

127.0.0.1:6379> info Memory
# Memory
used_memory:19549464
used_memory_human:18.64M
used_memory_rss:22568960
used_memory_rss_human:21.52M
used_memory_peak:19652296
used_memory_peak_human:18.74M
used_memory_peak_perc:99.48%
used_memory_overhead:2577824
used_memory_startup:836248
used_memory_dataset:16971640
used_memory_dataset_perc:90.69%
allocator_allocated:19912928
allocator_active:20385792
allocator_resident:23306240
total_system_memory:3997294592
total_system_memory_human:3.72G
used_memory_lua:37888
used_memory_lua_human:37.00K
used_memory_scripts:0
used_memory_scripts_human:0B
number_of_cached_scripts:0
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
allocator_frag_ratio:1.02
allocator_frag_bytes:472864
allocator_rss_ratio:1.14
allocator_rss_bytes:2920448
rss_overhead_ratio:0.97
rss_overhead_bytes:-737280
mem_fragmentation_ratio:1.16
mem_fragmentation_bytes:3060512
mem_not_counted_for_evict:0
mem_replication_backlog:1048576
mem_clients_slaves:20512
mem_clients_normal:82016
mem_aof_buffer:0
mem_allocator:jemalloc-5.1.0
active_defrag_running:0
lazyfree_pending_objects:0

Me neither.

But you could try to connect to the redis server via unixsocket instead of using 127.0.0.1:6379.

This is how I configured redis on my system…

Backup the Redis configuration file:

cp /etc/redis/redis.conf /etc/redis/redis.conf.bak

Adjust the configuration:

sed -i "s/port 6379/port 0/" /etc/redis/redis.conf
sed -i s/\#\ unixsocket/\unixsocket/g /etc/redis/redis.conf
sed -i "s/unixsocketperm 700/unixsocketperm 770/" /etc/redis/redis.conf
sed -i "s/# maxclients 10000/maxclients 512/" /etc/redis/redis.conf
usermod -aG redis www-data

Backup the file sysctl.conf:

cp /etc/sysctl.conf /etc/sysctl.conf.bak

Set avm.overcommit_memory to a value of 1:

sed -i '$avm.overcommit_memory = 1' /etc/sysctl.conf

…after that change your entries in the config php like this and reboot your server:

'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 0.0,
),

Source: https://www.c-rieger.de/nextcloud-21-mit-apache2-fast-track/

I hope that helps…

I have tried it and didn’t worked. However the error message has changed ,

this
{"reqId":"YRqAe-hnK509CbmpkrOgxwAAAEU","level":3,"time":"2021-08-16T15:12:59+00:00","remoteAddr":"10.8.0.1","user":"--","app":"core","method":"GET","url":"/nextcloud/","message":{"Exception":"R edisException","Message":"Redis server went away","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/Memcache/Redis.php","line":55,"function":"get","class":"Redis","type":"->"},{"fi le":"/var/www/html/nextcloud/lib/private/App/InfoParser.php","line":60,"function":"get","class":"OC\\Memcache\\Redis","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/App/AppManager.ph p","line":511,"function":"parse","class":"OC\\App\\InfoParser","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/App/AppManager.php","line":526,"function":"getAppInfo","class":"OC\\App\ \AppManager","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_App.php","line":570,"function":"getAppVersion","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/html /nextcloud/lib/private/legacy/OC_App.php","line":873,"function":"getAppVersion","class":"OC_App","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_Util.php","line":1474,"funct ion":"shouldUpgrade","class":"OC_App","type":"::"},{"file":"/var/www/html/nextcloud/lib/public/Util.php","line":520,"function":"needUpgrade","class":"OC_Util","type":"::"},{"file":"/var/www/htm l/nextcloud/lib/private/legacy/OC_Template.php","line":117,"function":"needUpgrade","class":"OCP\\Util","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_Template.php","line": 78,"function":"initTemplateEngine","class":"OC_Template","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_Template.php","line":322,"function":"__construct","class":"OC_Templa te","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":63,"function":"printExceptionErrorPage","class":"OC_Template","type":"::"}],"File":"/var/www/html/nextcloud/lib/private/Memca che/Redis.php","Line":55,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36","version":"21.0. 3.1"}

and this from cron (older message)

{"reqId":"Fyi5pHYMY8GUmP4VRb0m","level":3,"time":"2021-08-16T15:10:01+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":{"Exception":"RedisException","Message":"C onnection refused","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/RedisFactory.php","line":92,"function":"connect","class":"Redis","type":"->"},{"file":"/var/www/html/nextcloud/ lib/private/RedisFactory.php","line":108,"function":"create","class":"OC\\RedisFactory","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Memcache/Redis.php","line":43,"function":"getIn stance","class":"OC\\RedisFactory","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Memcache/Factory.php","line":115,"function":"__construct","class":"OC\\Memcache\\Redis","type":"->"} ,{"file":"/var/www/html/nextcloud/lib/private/Server.php","line":1032,"function":"createLocking","class":"OC\\Memcache\\Factory","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFra mework/Utility/SimpleContainer.php","line":155,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rd party/pimple/pimple/src/Pimple/Container.php","line":118,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitiv e parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":122,"function":"offsetGet","class":"Pimple\\Container","type":"->"},{" file":"/var/www/html/nextcloud/lib/private/ServerContainer.php","line":137,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/ lib/private/AppFramework/Utility/SimpleContainer.php","line":56,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Server.php","line":199 0,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/View.php","line":119,"function":"getLockingProvider","cla ss":"OC\\Server","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Server.php","line":430,"function":"__construct","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/nextclou d/lib/private/AppFramework/Utility/SimpleContainer.php","line":155,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/ww w/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php","line":118,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"," args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":122,"function":"offsetGet","class":"Pimple\\Contai ner","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/ServerContainer.php","line":137,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var /www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":56,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Se rver.php","line":1353,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/base.php","line":588,"function":"boot","class":"OC\ \Server","type":"->"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1076,"function":"init","class":"OC","type":"::"},{"file":"/var/www/html/nextcloud/cron.php","line":43,"args":["/var/w ww/html/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/RedisFactory.php","Line":92,"CustomMessage":"--"},"userAgent":"--","version":"21.0.3.1"}

confusing more as it says

Did you add the redis user to the www-data group?

usermod -a -G redis www-data

If yes could you please post the contents of your /etc/redis/redis.conf file?

What are the permissions of /var/log/redis?

pheww I switched to redis in docker

docker run -v /etc/redis/redis.conf:/etc/redis/redis.conf -p 7001:6379 -v /var/log/redis:/var/log/redis --name redis1 -d redis:6.0.9

and now I am able to launch the nextcloud instance but it is not logging me in

this is the new error:

3831 {"reqId":"YRqCa-hnK509CbmpkrOgzQAAAEs","level":1,"time":"2021-08-16T15:21:27+00:00","remoteAddr":"10.8.0.1","user":"--","app":"no app in context","method":"GET","url":"/nextcloud/","message":{"     Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"audioplayer.page.index\" as such route does not exist.","Co     de":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":365,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"file     ":"/var/www/html/nextcloud/lib/private/Route/CachingRouter.php","line":60,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/URLGenerato     r.php","line":85,"function":"generate","class":"OC\\Route\\CachingRouter","type":"->"},{"file":"/var/www/html/nextcloud/apps/audioplayer/lib/AppInfo/Application.php","line":50,"function":"linkT     oRoute","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/NavigationManager.php","line":110,"function":"OCA\\audioplayer\\AppInfo\\{closure}","class":"OCA\\au     dioplayer\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/theming/lib/ThemingDefaults.php","line":184,"function":"getA     ll","class":"OC\\NavigationManager","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/Defaults.php","line":160,"function":"getShortFooter","class":"OCA\\Theming\\ThemingDefaults","type":     "->"},{"file":"/var/www/html/nextcloud/lib/private/Template/JSConfigHelper.php","line":293,"function":"getShortFooter","class":"OCP\\Defaults","type":"->"},{"file":"/var/www/html/nextcloud/lib/     private/TemplateLayout.php","line":211,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_Template.php","line":183     ,"function":"__construct","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type     ":"->"},{"file":"/var/www/html/nextcloud/lib/base.php","line":296,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/html/nextcloud/lib/base.php","line":942,"fun     ction":"checkMaintenanceMode","class":"OC","type":"::"},{"file":"/var/www/html/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextclo     ud/apps/bookmarks/vendor/symfony/routing/Generator/UrlGenerator.php","Line":143,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Geck     o) Chrome/92.0.4515.131 Safari/537.36","version":"21.0.3.1"}
3832 {"reqId":"YRqCa-hnK509CbmpkrOgzQAAAEs","level":1,"time":"2021-08-16T15:21:27+00:00","remoteAddr":"10.8.0.1","user":"--","app":"no app in context","method":"GET","url":"/nextcloud/","message":{"     Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"theming.Theming.getImage\" as such route does not exist.","     Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":365,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"fi     le":"/var/www/html/nextcloud/lib/private/Route/CachingRouter.php","line":60,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/URLGenera     tor.php","line":85,"function":"generate","class":"OC\\Route\\CachingRouter","type":"->"},{"file":"/var/www/html/nextcloud/apps/theming/lib/ThemingDefaults.php","line":260,"function":"linkToRout     e","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/Defaults.php","line":189,"function":"getLogo","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file"     :"/var/www/html/nextcloud/core/templates/layout.guest.php","line":42,"function":"getLogo","class":"OCP\\Defaults","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Template/Base.php","l     ine":180,"args":["/var/www/html/nextcloud/core/templates/layout.guest.php"],"function":"include"},{"file":"/var/www/html/nextcloud/lib/private/Template/Base.php","line":150,"function":"load","c     lass":"OC\\Template\\Base","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_Template.php","line":180,"function":"fetchPage","class":"OC\\Template\\Base","type":"->"},{"file":     "/var/www/html/nextcloud/lib/private/legacy/OC_Template.php","line":211,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Template/Base.php"     ,"line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/html/nextcloud/lib/base.php","line":296,"function":"printPage","class":"OC\\Template\\Base","type":"->"},     {"file":"/var/www/html/nextcloud/lib/base.php","line":942,"function":"checkMaintenanceMode","class":"OC","type":"::"},{"file":"/var/www/html/nextcloud/index.php","line":37,"function":"handleReq     uest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/apps/bookmarks/vendor/symfony/routing/Generator/UrlGenerator.php","Line":143,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Win     dows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36","version":"21.0.3.1"}

Here is my redis.conf

However from docker logs I have discovered it is not considered.

docker logs redis1

1:C 16 Aug 2021 18:20:54.178 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 16 Aug 2021 18:20:54.179 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 16 Aug 2021 18:20:54.179 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1:M 16 Aug 2021 18:20:54.188 * Running mode=standalone, port=6379.
1:M 16 Aug 2021 18:20:54.188 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1:M 16 Aug 2021 18:20:54.188 # Server initialized
1:M 16 Aug 2021 18:20:54.190 * Ready to accept connections

I’m not a Docker expert. But it says in your logs: " Warning: no config file specified, using the default config.

In order to specify a config file, you have to include the path in your “docker run” command or in your docker-compose file, depending on how you manage your docker container, like discribed here… Docker Hub

However I would not use the Docker image. In your case it adds just more complexity for little to no gain. I would recommend to purge redis completley from your system.

apt purge redis-server

After that reboot your machine and reinstall it

apt install redis-server

After that, change the configuration and permissions like I described it in my earlier post…

The imported things are that php-redis is installed and that you add the redis user to the www-data group. And of course the lines in the config.php of Nextcloud.

Instead of using the sed commands for the configuration changes you could also use my working config.file (commented lines are removed)

bind 127.0.0.1 ::1
protected-mode yes
port 0
tcp-backlog 511
unixsocket /var/run/redis/redis-server.sock
unixsocketperm 770
timeout 0
tcp-keepalive 300
daemonize yes
supervised no
pidfile /var/run/redis/redis-server.pid
loglevel notice
logfile /var/log/redis/redis-server.log
databases 16
always-show-logo yes
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir /var/lib/redis
slave-serve-stale-data yes
slave-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
slave-priority 100
maxclients 512
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
slave-lazy-flush no
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble no
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes

If this still doesn’t work, I honestly don’t know what else it could be. For me, this configuration runs unchanged for several years without any problems.

You could also test it with the settings in the official documentation. I think the time outs are set diffrent there…

https://docs.nextcloud.com/server/21/admin_manual/configuration_server/caching_configuration.html#id2

Hope that helps…

Thank you @bb77 for great help and support. I got my instance up back up.
I found Docker Hub how to round redis in docker container.
However I will try to use your suggested redis configuration. I think you are right redis on baremetal would be faster. my current install of Nextcloud is slower maybe becuase of reids in docker or due to lot of other errors that are being spit over time.

1 Like

Glad to hear it’s working again—.

I’m not a Docker expert. But afaik Containers should have very little overhead. I rather thought that it adds more complexity to your setup because the rest of your stack is installed via package manager. But it would certainly be worth a try and interesting to hear how the result turned out… :slight_smile: