问题解决:io.lettuce.core.RedisCommandTimeoutException: Command timed out after

环境:

spring-boot-starter 2.x 和 sprig-data-starter-data-redis 2.x

在使用

connection.bRPop(timeout, rawKey);

方法时,如果这里的timeout大于springboot配置文件的spring.redis.timeout,就会出现异常io.lettuce.core.RedisCommandTimeoutException: Command timed out after。

所以解决方法就是timeout不要超出连接池的timeout就好了

猜你喜欢

转载自blog.csdn.net/u014108439/article/details/103270050