Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

auto-reconnect to redis after it's recovered

$
0
0

i have microservices keep throwing exceptions about Redis connection failure until we restart them. how can i implement a mechanism to auto-reconnect to Redis when it's available again without the need to restart all failed microservices ?

i use singleServerConfig in yaml file :singleServerConfig:idleConnectionTimeout: 10000connectTimeout: 10000timeout: 10000retryAttempts: 3retryInterval: 1500password: nullsubscriptionsPerConnection: 5clientName: nulladdress: "${REDIS_PROTOCOL}://${REDIS_HOST1}:${REDIS_PORT}"subscriptionConnectionMinimumIdleSize: 1subscriptionConnectionPoolSize: 50connectionMinimumIdleSize: 10connectionPoolSize: 64database: 0threads: 0nettyThreads: 0codec: !<org.redisson.codec.JsonJacksonCodec> {}

exception :Caused by: javax.cache.CacheException: org.redisson.client.RedisConnectionException: SlaveConnectionPool no available Redis entries


Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>