You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RedisCluster slot caching causes RedisClusterException on master change #2202
A manual or automatic cluster failover doesn't have any impact.
Actual behaviour
A cluster failover causes RedisClusterException: Couldn't map cluster keyspace using any provided seed for the first requests after (or during?) a cluster failover, if slot caching is enabled
I'm seeing this behaviour on
OS: debian
Redis: redis_version:6.2.7
PHP: 7.4.30
phpredis: how to get version? I think latest 5.3.7, as it's freshly built with pecl install redis.
Steps to reproduce, backtrace or example script
Setup redis cluster
Setup php-fpm with pooling static and only a few workers, e.g. in my setup start_servers=2 (important, otherwise not reproducible!)
Configure session_save_path to use cluster with seed[]=10.x.x.x:6379&...&failover=error
Add redis.clusters.cache_slots = 1 to a php.ini file.
Open a php-page that uses session (and for me also writes some cache keys)
Connect to a slave and master redis cluster node, of the same keyspace partition
exec monitor and load your page, to ensure any write transactions (like setex from session) are done at your node
do a cluster failover on the master
immediately load your test page -> it will hang until timeout is reached and RedisClusterException: Couldn't map cluster keyspace using any provided seed is throwed
Sometimes it needs two attempts to reproduce it, then just failover back.
Activity
salkhwlani commentedon May 15, 2023
the same issue here
aKugler commentedon Mar 31, 2025
I have the same issue