Nextcloud on Kubernetes with Redis cluster

I’ve set up Nextcloud on Kubernetes with a standalone Redis instance.

Now, I’d like to set up a Redis cluster to have the whole setup high available.

Since the helm charts don’t directly support Redis clusters, I configured a custom PHP config as follows:

<?php
        $CONFIG = array (
          'memcache.distributed' => '\OC\Memcache\Redis',
          'memcache.locking' => '\OC\Memcache\Redis',

          'redis' => array(),
          'redis.cluster' => array (
            'seeds' => array(
              'nextcloud-redis-0.nextcloud-redis-headless:6379',
              'nextcloud-redis-1.nextcloud-redis-headless:6379',
              'nextcloud-redis-2.nextcloud-redis-headless:6379',


            ),
            'timeout' => 1.5,
            'read_timeout' => 1.5,
            'failover_mode' => \RedisCluster::FAILOVER_ERROR,
            'password' => getenv('REDIS_HOST_PASSWORD'),
          )
        );

The Nextcloud container starts with this configuration but eventually crashes without any meaningful errors in the container logs. The only thing logged is:

WARNING: [pool www] server reached pm.max_children setting (5), consider raising it

The browser itself eventually reports a 504.

How can I get the Redis cluster to work or at least have a more verbose logging in the container?

What about the Nextcloud log?

The container log only logs web/SAPI level matters.

It depends on how the Redis cluster is configured. There are different error messages. I tried multi-master, replication and sentinel configuration and each time there are errors about either not being able to write into a read-only replica (even when directed directly to the master service) or not reaching the redis at all.

Please be more specific. We need to see actual error messages. Note, Redis Sentinel != Redis Cluster.

There is a support template for a reason. We’re all volunteers. Please respect our time and help us help you.

Did you manage to resolve issue with connectiion on redis cluster?

No, in the end I gave up and reverted to a standalone Redis pod. We can live with that for the moment.