Problem with memcache distributed Redis

I’m using the last version of Nextcloud, installed with the Plesk’s extension.

It works good (I’ve a problem with the indexing from search engine for shared files but this is another “story”) but when I try to set the cache the application crash, stop to works.

'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'memcache.local' => '\OC\Memcache\APCu',
  'redis' => array(
    'host' => 'localhost',
    'port' => 6379,

In the logs I see this error:

no app in context
RedisException: Connection refused

If I remove:

'memcache.distributed' => '\OC\Memcache\Redis',

It works good again.
I’ve Redis installed on the server as extension of the handler PHP 7.4 FPM.
Is there some extra configuration to do?
If I don’t use the memcache (distributed, local, locking) is a problem for Nextcloud or can I remove the above code and continue to work quietly?

I do not use Redis. But i think you can test “redis.sock” instead of the socket “localhost.6379”.

Problems with config.php and Redis

For other settings search “redis.sock” in this forum.

Have you activated PHP Caching?
Search “Enable PHP OPcache” in

Read also

1 Like

If I remove:

'memcache.distributed' => '\OC\Memcache\Redis',

It works good again.

I also used Redis as caching backend. For me my configuration looks like this:

$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '',
    'port' => '6379',
    'timeout' => '0.0',

Can you connect to redis with redis-cli?


Unfortunately Redis Server is currently not supported on Plesk.
Is available a workaround with Redis Docker but Plesk Team suggest me don’t use APCu for local cache, because it’s old and no more supported, so I think it’s better wait for the moment.

I hope to see in the next versions of Nextcloud a more simple and modern way to manage the cache.

This is how it’s done in the Nextcloud VM:

1 Like

My hosting provider has suggest not to use memcache but only enable Opcache on PHP (he told me that APCu should be used with great caution, it can generate a lot of problems on the server, is a cache technology outdate):

In the Nextcloud documentation is indicated:

There are two types of caches to use: a PHP opcode cache, which is commonly called opcache, and data caching for your Web server. If you do not install and enable a local memcache you will see a warning on your Nextcloud admin page. A memcache is not required and you may safely ignore the warning if you prefer.

Did he tell you why, or is it just a lazy hosting provider that doesn’t care to much about installing the best for the customers? :smiley:

You’re right, I’ve insisted and they installed “Redis server”, now it works good.

1 Like