問題解決: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就好了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章