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?