请教一个 redis 长时间不使用再使用会报 command timeout 错误的问题
时间: 2020-08-21来源:V2EX
前景提要
环境是 springboot2.0,连接池是 springboot 带的 lettuce 配置使用的是默认配置 现象就是 一段时间不是用 redis, 再去使用的时候就会报 command timeout exception
下面是报错信息 Redis command timed out; nested exception is io.lettuce.core.RedisCommandTimeoutException: Command timed out at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:70) 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.LettuceKeyCommands.convertLettuceAccessException(LettuceKeyCommands.java:650) at org.springframework.data.redis.connection.lettuce.LettuceKeyCommands.keys(LettuceKeyCommands.java:148) at org.springframework.data.redis.connection.DefaultedRedisConnection.keys(DefaultedRedisConnection.java:75) at org.springframework.data.redis.core.RedisTemplate.lambda$keys$10(RedisTemplate.java:840) 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.RedisTemplate.keys(RedisTemplate.java:840)
早网上找了找没找到什么有用的解决方案,特来请教

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行