New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate PING when Redis connection got reconnected #3412
Comments
maybe add ctx.isRemoved() in PingConnectionHandler can help
|
Fixed! Thanks for suggestion |
我认为 #3302 目前测试中还是有异常出现,过早的认为连接需要重连会导致这两个问题:1 连接关闭 2 连接超时 在我们的实际网络环境下+2s可以比较好的解决了这些异常 in my submissson (#3302)
|
What does it mean? Can you provide test code to reproduce the issue? |
重写RedisExecutor.java的363行代码popTimeout+1,修改为popTimeout+2 rewrite RedisExecutor.java 363 lines of code poptimeout + 1, changed to poptimeout + 2 |
org.redisson.client.WriteRedisConnectionException: Unable to write command into connection! Node source: NodeSource [slot=0, addr=null, redisClient=null, redirect=null, entry=null], connection: RedisConnection@1898325484 [redisClient=[addr=redis://10.111.17.89:6379], channel=[id: 0x129e9fa4, L:/10.65.140.249:4596 ! R:/10.111.17.89:6379], currentCommand=CommandData [promise=RedissonPromise [promise=ImmediateEventExecutor$ImmediatePromise@67a25fd1(success)], command=(BLPOP), params=[KEC:MESSAGE:MIGRATE_VM_TO_DEDICATED_QUEUE:cn-beijing-fin, 13], codec=org.redisson.codec.JsonJacksonCodec]], command: (BLPOP), params: [KEC:MESSAGE:CROSS_INSTANCE_MIGRATE_QUEUE:cn-taipei-1, 11] after 0 retry attempts
org.redisson.client.RedisTimeoutException: Command still hasn't been written into connection! Avoid to use blocking commands in Async/JavaRx/Reactive handlers. Try to increase nettyThreads setting. Payload size in bytes: 0. Node source: NodeSource [slot=0, addr=null, redisClient=null, redirect=null, entry=null], connection: RedisConnection@2084555758 [redisClient=[addr=redis://10.111.17.89:6379], channel=[id: 0xe60b38ab, L:/10.65.140.249:5009 - R:/10.111.17.89:6379], currentCommand=CommandData [promise=RedissonPromise [promise=ImmediateEventExecutor$ImmediatePromise@7d093eda(failure: org.redisson.client.RedisTimeoutException: Command execution timeout for command: (PING), params: [], Redis client: [addr=redis://10.111.17.89:6379])], command=(PING), params=[], codec=org.redisson.client.codec.StringCodec]], command: (BLPOP), params: [KEC:MESSAGE:CROSS_INSTANCE_MIGRATE_QUEUE:eu-east-1, 14] after 3 retry attempts |
When a blockQueue executed with TIMEOUT, it will always trigger reconnecting via one connection. PING will trigger again when connection reconnected, but previous PING will still ongoing.
ps: 3302 fix will reduce the possibility of reconnecting, but whenever reconnecting happen, duplication ping will happen.
Expected behavior
Redis PING performed one time per interval per connection
Actual behavior
Redis PING performed mutiple times per interval per connection when this connection got reconnected
Steps to reproduce or test case
Redis version
ANY
Redisson version
3.13.6
Redisson configuration
ANY
The text was updated successfully, but these errors were encountered: