Arbitrary io.lettuce.core.RedisCommandTimeoutException in Lettuce Redis client

211 Views Asked by At

We are using Lettuce through Spring Data Redis and Redis Server is a GCP Memorystore service. We have a simple Redis Standalone Configuration in our application where a single RedisClient is shared between multiple threads in the entire application. We obtain the stateful RedisCommands(redisClient.connect().sync()) object to execute the Redis commands. The only Redis commands that we use are setex,get,del,incr,pttl & set.

Once in a while, we are seeing the following RedisCommandTimeout Exceptions on any one of the many application nodes and we need to restart the node to recover from this exception.

Any insights here will be helpful.

stack_trace:io.lettuce.core.RedisCommandTimeoutException: Command timed out after 20 second(s)
    at io.lettuce.core.ExceptionFactory.createTimeoutException(ExceptionFactory.java:51)
    at io.lettuce.core.LettuceFutures.awaitOrCancel(LettuceFutures.java:114)
    at io.lettuce.core.FutureSyncInvocationHandler.handleInvocation(FutureSyncInvocationHandler.java:69)
    at io.lettuce.core.internal.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:80)
    at com.sun.proxy.$Proxy133.get(Unknown Source)

Also, when we check the thread dumps, I'm seeing about 128 threads with names like redisson-netty-5-1, redisson-netty-5-2...redisson-netty-5-128. Is this expected to have so many threads?

0

There are 0 best solutions below