redisson / redisson

Redisson - Easy Redis Java client and Real-Time Data Platform. Valkey compatible. Sync/Async/RxJava/Reactive API. Over 50 Redis or Valkey based Java objects and services: Set, Multimap, SortedSet, Map, List, Queue, Deque, Semaphore, Lock, AtomicLong, Map Reduce, Bloom filter, Spring, Tomcat, Scheduler, JCache API, Hibernate, RPC, local cache...
https://redisson.pro
Apache License 2.0
23.26k stars 5.34k forks source link

PING Command execution timeout for command #5624

Closed Venkat-C-J closed 5 months ago

Venkat-C-J commented 8 months ago

We are facing below exception org.redisson.client.RedisTimeoutException: Command execution timeout for command: (PING), params: [], Redis client: [addr=xxxx://xxxx] at org.redisson.client.RedisConnection.lambda$async$0(RedisConnection.java:261) at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715) at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34) at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703) at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790) at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:750)

We came across this GitHub link https://github.com/redisson/redisson/issues/4451 where a similar exception was reported. This issue was addressed in Redisson version 3.17.6.

Issue: https://github.com/redisson/redisson/issues/4441  PR: https://github.com/redisson/redisson/commit/b320f191c6a03c3d19c3c648a85d83d7280747ac

We are currently in 3.20.1 but still facing the same issue.

mrniko commented 8 months ago

Fixed in https://github.com/redisson/redisson/issues/5493 Try 3.26.1 version

Venkat-C-J commented 7 months ago

Fixed in #5493 Try 3.26.1 version

@mrniko your swift response is greatly appreciated. We will be testing with the latest version, 3.26.1. Thank you!

Venkat-C-J commented 7 months ago

@mrniko While this issue has been reported across various Redisson versions, it specifically emerges in a particular environment despite multiple deployments using the same Redisson version (3.20.1). Our aim is to comprehend the specific scenarios leading to this problem. By doing so, we can proactively prevent or take necessary actions to mitigate the occurrence of this issue in other environments.

Issue reported in 3.17.6 version : https://github.com/redisson/redisson/issues/4441 PR : https://github.com/redisson/redisson/commit/b320f191c6a03c3d19c3c648a85d83d7280747ac

Issue reported in 3.23.4 version : https://github.com/redisson/redisson/issues/5371 PR : https://github.com/redisson/redisson/commit/605665665e0a6e85d76b844b7ea316554661969a

Issue reported in 3.25.0 version : https://github.com/redisson/redisson/issues/5493 PR : https://github.com/redisson/redisson/commit/e7bdea6cd476f3adb2f75db07136690c72fb93a3

Thanks

mrniko commented 7 months ago

@Venkat-C-J

I suggest you to check the network of this environment.

ShriramDeshkar commented 7 months ago

Same error in latest 3.27.0 version

org.redisson.client.RedisTimeoutException: Command execution timeout for command: (PING), params: [], Redis client: [addr=rediss://xxxx:6380] at org.redisson.client.RedisConnection.lambda$async$0(RedisConnection.java:253) at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715) at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34) at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703) at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790) at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:840)

mrniko commented 7 months ago

@ShriramDeshkar

Did you try to increase ping timeout interval?

ShriramDeshkar commented 7 months ago

I have not set any timeout interval explicitly ...I m using org.redisson.config.Config to set configuration of RedissonClient object .....what is your recommendation ? What value shall we use while setting timeout interval ? and which method to use setTimeout() or setConnectTimeout() ?

ShriramDeshkar commented 7 months ago

@mrniko any update on this issue ?

pious68 commented 7 months ago

@mrniko any update on this issue ?

my redis version is 7.2.4,redissson version is 3.27.1,without any questions,i think it is redisson version and redis version don‘t match

mrniko commented 7 months ago

@ShriramDeshkar

Sorry, unable to reproduce it.

@pious68

What do you mean PING command is compatible with any version of Redisson and Redis

Venkat-C-J commented 7 months ago

Hi @mrniko,

We are currently facing issues across all environments. To resolve the problem, we have consulted Amazon regarding possible network issues. However, they have confirmed that there are no current network-related issues. In addition, we have attempted to fix the problem by configuring the Idle Timeout to 60 seconds on Redis Cluster. Despite these measures, we are still encountering issues.

mrniko commented 7 months ago

@Venkat-C-J

Can you share the Redisson config?

Ftrybe commented 5 months ago

I encountered the same error and initially had Redis version 6. Upgrading to the latest version resolved the issue for me. It seems that compatibility or specific fixes in the newer Redis versions may address this error. It might be worth checking if there’s a particular version or configuration change that specifically targets this issue. 

mrniko commented 5 months ago

@Ftrybe There are no fixes in Redisson related to specific Redis versions. I guess Redis redeployment in cloud may also helped to resolve the issue.