title: Too many RedisCommandTimeoutException in lettuce
body: <p>We are facing this specific issue using lettuce redis library. We are receiving too many RedisCommandTimeoutException. We have set a timeout of 2 secs in redis-cli and 10 ms in redis slow logs. While nothing gets logged in slowlogs our application keeps getting this timeout. </p>
  
  <p>Code we are using is as follows</p>
  
  <pre><code>Duration timeout = 
  Duration.ofMillis(applicationProperties.redisTimeOut);
  RedisClient client = RedisClient.create(RedisURI.create(applicationProperties.redisUrl));
  client.setDefaultTimeout(timeout);
  RedisCommands&lt;String, String&gt; commands = client.connect().sync();
  </code></pre>
  
  <p>We have about 100 threads in our application wgich might be using this shared connection</p>
  
  <p>Exception we receive is as follows</p>
  
  <pre><code>io.lettuce.core.RedisCommandTimeoutException: Command timed out
  at io.lettuce.core.LettuceFutures.awaitOrCancel(LettuceFutures.java:114)
  at io.lettuce.core.FutureSyncInvocationHandler.handleInvocation(FutureSyncInvocationHandler.java:62)
  at io.lettuce.core.internal.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:80)
  at com.sun.proxy.$Proxy11.hmget(Unknown Source)
  </code></pre>