Skip to content
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

Lettuce bug(RedisCommandTimeoutException) in spring-boot-autoconfigure 2.0.5 #1756

Closed
Gabrieljev opened this issue May 20, 2021 · 2 comments
Closed
Labels
status: waiting-for-feedback We need additional information before we can continue

Comments

@Gabrieljev
Copy link

Gabrieljev commented May 20, 2021

Bug Report

Redis version:5.0.3 mode:Standalone
Using Twemproxy
springboot-data-redis:2.0.5.REALESE
lettuce version : default version

The lettuce is default redis client. Spring boot autoconfigure in LettuceConnectionConfiguration,

picture the properties here
spring.redis.timeout=1000
spring.redis.lettuce.pool.max-active=50
spring.redis.lettuce.pool.max-wait=-1ms
spring.redis.lettuce.pool.max-idle=50
spring.redis.lettuce.pool.min-idle=0

twemproxy timeout : 400ms

io.lettuce.core.RedisCommandExecutionException: ERR Connection timed out
org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: ERR Connection timed out
	at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:54)
	at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:52)
	at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:41)
	at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:44)
	at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:42)
	at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:257)
	at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.convertLettuceAccessException(LettuceStringCommands.java:718)
	at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.mGet(LettuceStringCommands.java:116)
	at org.springframework.data.redis.connection.DefaultedRedisConnection.mGet(DefaultedRedisConnection.java:224)
	at org.springframework.data.redis.core.DefaultValueOperations.lambda$multiGet$4(DefaultValueOperations.java:142)
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:224)
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:184)
	at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:95)
	at org.springframework.data.redis.core.DefaultValueOperations.multiGet(DefaultValueOperations.java:142)
	at com.tiket.tix.hotel.markup.service.impl.CacheServiceImpl.findCacheByMultipleKeys(CacheServiceImpl.java:53)
	at com.tiket.tix.hotel.markup.service.impl.SystemParameterServiceImpl.lambda$findSystemParameterByVariableIn$26(SystemParameterServiceImpl.java:210)
	at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:47)
	at reactor.core.publisher.FluxPeek.subscribe(FluxPeek.java:83)
	at reactor.core.publisher.MonoCollectList.subscribe(MonoCollectList.java:59)
	at reactor.core.publisher.MonoPeekFuseable.subscribe(MonoPeekFuseable.java:74)
	at reactor.core.publisher.MonoFlatMap.subscribe(MonoFlatMap.java:60)
	at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:59)
	at reactor.core.publisher.MonoPeekFuseable.subscribe(MonoPeekFuseable.java:74)
	at reactor.core.publisher.MonoDoFinallyFuseable.subscribe(MonoDoFinallyFuseable.java:48)
	at reactor.core.publisher.Mono.subscribe(Mono.java:3088)
	at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:123)
	at reactor.core.scheduler.ExecutorScheduler$ExecutorTrackedRunnable.run(ExecutorScheduler.java:189)
	at reactor.core.scheduler.ExecutorScheduler$ExecutorSchedulerTrampolineWorker.run(ExecutorScheduler.java:382)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: io.lettuce.core.RedisCommandExecutionException: ERR Connection timed out
	at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:118)
	at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:109)
	at io.lettuce.core.protocol.CommandWrapper.complete(CommandWrapper.java:57)
	at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:598)
	at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:556)
	at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:508)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808)
	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:410)
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:310)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

This Exception is use :

<dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-redis-reactive</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-pool2</artifactId>
    </dependency>

Use jedis will solve this issue. but not a good option

@mp911de
Copy link
Collaborator

mp911de commented May 21, 2021

Connection timed out is a Redis response. What specific behavior would you expect in this case?

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label May 21, 2021
@mp911de
Copy link
Collaborator

mp911de commented Jun 9, 2021

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@mp911de mp911de closed this as completed Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-feedback We need additional information before we can continue
Projects
None yet
Development

No branches or pull requests

2 participants