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
Hi, Jedis community. we have an auto scaling redis cluster where the nodes are going in and out frequently. So I know that JedisClusterInfoCache.renewClusterSlots() is called when there is a connection problem when executing command. That is not sufficient to make sure the cluster has the current working nodes. So we create a scheduledExecutor to call JedisClusterConnectionProvider.renewSlotCache() to renew slot cache periodically ( I got the reference to the underlying JedisClusterConnectionProvider object by reflection if that matters). However, that still does not solve the problem. The scheduled thread works for some period of time then throw this exception whenever trying to do the renew. And running command using the JedisCluster also failed. Can someone educate me on how can I make Jedis work against an auto scaling redis cluster? I am under the impression that Jedis should handle nodes going in and out. Thank you very much! Jedis Community.
redis.clients.jedis.exceptions.JedisException: Could not get a resource from the pool
at redis.clients.jedis.util.Pool.getResource(Pool.java:38)
at redis.clients.jedis.ConnectionPool.getResource(ConnectionPool.java:28)
at redis.clients.jedis.JedisClusterInfoCache.renewClusterSlots(JedisClusterInfoCache.java:123)
at redis.clients.jedis.providers.ClusterConnectionProvider.renewSlotCache(ClusterConnectionProvider.java:58)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, Jedis community. we have an auto scaling redis cluster where the nodes are going in and out frequently. So I know that JedisClusterInfoCache.renewClusterSlots() is called when there is a connection problem when executing command. That is not sufficient to make sure the cluster has the current working nodes. So we create a scheduledExecutor to call JedisClusterConnectionProvider.renewSlotCache() to renew slot cache periodically ( I got the reference to the underlying JedisClusterConnectionProvider object by reflection if that matters). However, that still does not solve the problem. The scheduled thread works for some period of time then throw this exception whenever trying to do the renew. And running command using the JedisCluster also failed. Can someone educate me on how can I make Jedis work against an auto scaling redis cluster? I am under the impression that Jedis should handle nodes going in and out. Thank you very much! Jedis Community.
I am using Jedis 4.2.3 and Java 17
Beta Was this translation helpful? Give feedback.
All reactions