【解決】io.lettuce.core.RedisCommandTimeoutException: Command timed out
springboot(spring也一樣的)整個redis 的時候報如下錯誤:
org.springframework.dao.QueryTimeoutException: 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) ~[spring-data-redis-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:41) ~[spring-data-redis-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:44) ~[spring-data-redis-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:42) ~[spring-data-redis-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:257) ~[spring-data-redis-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.data.redis.connection.lettuce.LettuceConnection.pSubscribe(LettuceConnection.java:747) ~[spring-data-redis-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.data.redis.listener.RedisMessageListenerContainer$SubscriptionTask.eventuallyPerformSubscription(RedisMessageListenerContainer.java:783) ~[spring-data-redis-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.data.redis.listener.RedisMessageListenerContainer$SubscriptionTask.run(RedisMessageListenerContainer.java:750) ~[spring-data-redis-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
Caused by: io.lettuce.core.RedisCommandTimeoutException: Command timed out
at io.lettuce.core.LettuceFutures.awaitOrCancel(LettuceFutures.java:114) ~[lettuce-core-5.0.2.RELEASE.jar:na]
at io.lettuce.core.FutureSyncInvocationHandler.handleInvocation(FutureSyncInvocationHandler.java:62) ~[lettuce-core-5.0.2.RELEASE.jar:na]
at io.lettuce.core.internal.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:80) ~[lettuce-core-5.0.2.RELEASE.jar:na]
at com.sun.proxy.$Proxy70.psubscribe(Unknown Source) ~[na:na]
at org.springframework.data.redis.connection.lettuce.LettuceSubscription.doPsubscribe(LettuceSubscription.java:54) ~[spring-data-redis-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.data.redis.connection.util.AbstractSubscription.pSubscribe(AbstractSubscription.java:130) ~[spring-data-redis-2.0.5.RELEASE.jar:2.0.5.RELEASE]
at org.springframework.data.redis.connection.lettuce.LettuceConnection.pSubscribe(LettuceConnection.java:745) ~[spring-data-redis-2.0.5.RELEASE.jar:2.0.5.RELEASE]
... 3 common frames omitted
錯誤原因:連線超時時間設定的過於短暫(我這邊設定成了0),修改為5000左右即可
# REDIS (RedisProperties)
# Redis資料庫索引(預設為0)
spring.redis.database=0
# Redis伺服器地址
spring.redis.host=192.168.30.103
# Redis伺服器連線埠
spring.redis.port=6379
# Redis伺服器連線密碼(預設為空)
spring.redis.password=
# 連線池最大連線數(使用負值表示沒有限制)
spring.redis.jedis.pool.max-active=8
# 連線池最大阻塞等待時間(使用負值表示沒有限制)
spring.redis.jedis.pool.max-wait=-1
# 連線池中的最大空閒連線
spring.redis.jedis.pool.max-idle=8
# 連線池中的最小空閒連線
spring.redis.jedis.pool.min-idle=0
# 連線超時時間(毫秒)
spring.redis.timeout=5000
相關文章
- io.lettuce.core.RedisCommandTimeoutException: Command timed out 解決辦法RedisException
- 報錯(已解決)Command timed out after no timeout
- JAVA IPMI Command time out 解決方法Java
- java.net.SocketTimeoutException: Read timed out異常解決方法JavaException
- 【python】pip安裝庫時出現Read timed out.解決辦法Python
- [Clickhouse] Clickhouse 報SQLException : Read timed outSQLException
- Springboot2.x整合lettuce連線redis叢集報超時異常Command timed out after 6 second(s)Spring BootRedis
- Failed to connect to ESP8266: Timed out waiting for packet headerAIHeader
- [debug] vagrant報錯mount.nfs: Connection timed outNFS
- WARNING: inbound connection timed out (ORA-3136)錯誤分析
- jdbc訪問KingbaseES資料庫SocketTimeoutException Read timed outJDBC資料庫Exception
- java.sql.SQLException:IO 錯誤:Socket read timed out !JavaSQLException
- Putty或MobaXTerm無法連線VMware虛擬機器 報Network error: Connection timed out的解決方案虛擬機Error
- 部分OPPO機型 AssetManager.finalize() timed out的修復
- oozie.action.hadoop.LauncherException: IO error Connection timed out: no further informationHadoopExceptionErrorORM
- Feign,HTTP連線超時問題SocketTimeoutException: Read timed outHTTPException
- 執行systemctl status ssh返回“Failed to get properties: Connection timed out”AI
- RetryableException: Read timed out executing導致服務假死無響應Exception
- java.sql.SQLRecoverableException: IO Error: Socket read timed out 排查歷程JavaSQLExceptionError
- Supervisor 解決 can't find command *
- bash: lspci: command not found解決方法
- -bash: XXX: command not found解決辦法
- 【ERROR】ORA-27102: out of memory 解決方法Error
- CM agent 傳送heartbeat給CM server 不斷髮生 connection refused:timed outServer
- 解決bash: mysql: command not found的問題MySql
- Mac終端出現 brew command not found 解決Mac
- zabbix_get :command not found 解決辦法
- Linux提示crontab command not found的解決方法Linux
- “command-not-found has crashed” 解決辦法 (*unsolved)
- 解決shell指令碼錯誤$’r’ command not found指令碼
- 關於遠端連線虛擬機器Network error: Connection timed out的問題虛擬機Error
- 【Azure Fabric Service】Service Fabric部署失敗問題 Provisioning of VM extension ConfigureVM has timed out.
- 解決 biolinux-conda command not found 2018-05-04Linux
- CentOS 7 命令 lsb_release: command not found 解決方案CentOS
- Nginx 報錯 504 Gateway Time-out 的解決方法NginxGateway
- 由node的批量requests引起的”heap out of memory”解決方案
- Composer 記憶體不足解決方案 PHP Fatal error: Out of memory記憶體PHPError
- [重慶思莊每日技術分享]-CENTOS7.7 登入顯示:abrt-cli status' timed outCentOS