question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting "RedisCommandTimeoutException: Command timed out" frequently

See original GitHub issue

I am using 4.1.2.Final version to connect to Redis Sentinel cluster. It works fine for some time after app starts, Then after some time, when I execute any command, It tries to connect and throws RedisCommandTimeoutException. After that, It reconnects automatically. and work fine again. This process goes on. I am using dropwizard framework and initializing CacheFactory ( which handle connection) when the application starts.

Logs

com.lambdaworks.redis.RedisCommandTimeoutException: Command timed out
    at com.lambdaworks.redis.LettuceFutures.await(LettuceFutures.java:95) ~[compliance-api.jar:0.0.1]
    at com.lambdaworks.redis.LettuceFutures.awaitOrCancel(LettuceFutures.java:74) ~[compliance-api.jar:0.0.1]
    at com.lambdaworks.redis.FutureSyncInvocationHandler.handleInvocation(FutureSyncInvocationHandler.java:63) ~[compliance-api.jar:0.0.1]
    at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87) ~[compliance-api.jar:0.0.1]
    at com.sun.proxy.$Proxy70.get(Unknown Source) ~[na:na]

Log when reconnects

[lettuce-eventExecutorLoop-5-3] [ConnectionWatchdog]: Reconnecting, last destination was /10.X.X.X:6379
[lettuce-eventExecutorLoop-5-3] [ConnectionWatchdog]: Reconnected to /10.X.X.X:6379.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
durgeshsuthar1992commented, Jun 30, 2016

It is working fine till now. Will update again by EOD.

Thanks a lot.

0reactions
mp911decommented, May 22, 2019

@omjego please post your question to StackOverflow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Redis command timed out; nested exception is io.lettuce.core ...
Redis command timed out; nested exception is io.lettuce.core.RedisCommandTimeoutException: Command timed out after 1 minute(s).
Read more >
Command timed out after 1 minute(s) during load test
On reading about this (redis command timeout ) exception, we understand that this occurs due to connection issue (channel getting disconnected) or the ......
Read more >
lettuce-io/Lobby - Gitter
RedisCommandTimeoutException . I understood that's because of Lettuce has Command Timeout. Now My Question is - How to override CommandTimeOut for certain ...
Read more >
Lettuce Reference Guide
The command references explains Redis commands and contains links to getting started guides, reference documentation and tutorials.
Read more >
Troubleshoot Azure Cache for Redis latency and timeouts
Learn how to resolve common latency and timeout issues with Azure Cache for Redis, such as Redis server patching and timeout exceptions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found