Redisson - org.redisson.client.RedisResponseTimeoutException: Redis server response timeout 3000 ms
Posted 放羊的牧码
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Redisson - org.redisson.client.RedisResponseTimeoutException: Redis server response timeout 3000 ms相关的知识,希望对你有一定的参考价值。
报错信息
org.redisson.client.RedisResponseTimeoutException: Redis server response timeout (3000 ms) occured after 3 retry attempts. Command: (HEXISTS), params: [com.dinsmooth.storehbase.schedule:entryTaskDelay, 1f15dcac-22b6-4865-92a5-a6452e6ae5c3:154], channel: [id: 0x4d120152, L:/10.255.2.30:52607 - R:172.16.0.211/172.16.0.211:6379]
at org.redisson.command.RedisExecutor$3.run(RedisExecutor.java:362)
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:682)
at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:757)
at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:485)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
分析原因
- 客户端长时间未使用,服务端会断开
解决方案
# 连接间隔心跳
pingConnectionInterval: 1000
// 集群
Config config = new Config();
config.useClusterServers().setPingConnectionInterval(15000);
// 单机
Config config = new Config();
config.useSingleServer().setPingConnectionInterval(15000);
以上是关于Redisson - org.redisson.client.RedisResponseTimeoutException: Redis server response timeout 3000 ms的主要内容,如果未能解决你的问题,请参考以下文章