【解決】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
- 解決 connect to host github.com port 22 operation timed outGithub
- java.net.SocketTimeoutException: Read timed out異常解決方法JavaException
- 【python】pip安裝庫時出現Read timed out.解決辦法Python
- Oracle RAC root.sh 報錯 Timed out waiting for the CRS stack to start 解決方法OracleAI
- [Clickhouse] Clickhouse 報SQLException : Read timed outSQLException
- sqlnet.log error - Operation timed outSQLError
- GoldenGate Pump Porcess: TCP/IP error 110 (Connection timed out)的問題解決GoTCPError
- ORA-13639: The CURRENT operation was interrupted because it timed OUT
- oracle 11.2.0.3 grid ons 程式 checked timed outOracle
- 【Oracle】 inbound connection timed out (ORA-3136)Oracle
- 解決 command not found: expressExpress
- pip安裝selenium報錯:Read timed out
- Android-問題-obtainBuffer timed out (is the CPU pegged?)AndroidAI
- java.sql.SQLException:IO 錯誤:Socket read timed out !JavaSQLException
- Putty或MobaXTerm無法連線VMware虛擬機器 報Network error: Connection timed out的解決方案虛擬機Error
- Springboot2.x整合lettuce連線redis叢集報超時異常Command timed out after 6 second(s)Spring BootRedis
- 執行systemctl status ssh返回“Failed to get properties: Connection timed out”AI
- oracle11gR2 Timed out waiting for the CRS stack to startOracleAI
- sqlplus: command not found解決SQL
- java.sql.SQLRecoverableException: IO Error: Socket read timed out 排查歷程JavaSQLExceptionError
- oozie.action.hadoop.LauncherException: IO error Connection timed out: no further informationHadoopExceptionErrorORM
- WARNING: inbound connection timed out (ORA-3136)錯誤分析
- ORA-3136錯誤分析——WARNING Inbound Connection Timed Out
- 解決MYSQL工具mysqldump 遇到 Out of memory 方法MySql
- Supervisor 解決 can't find command *
- bash: lspci: command not found解決方法
- jdbc訪問KingbaseES資料庫SocketTimeoutException Read timed outJDBC資料庫Exception
- Feign,HTTP連線超時問題SocketTimeoutException: Read timed outHTTPException
- eclipse 線上安裝android包:Download interrupted: Read timed outEclipseAndroid
- kernel: ide-cd: cmd 0x1e timed out -- LinuxIDELinux
- 資料庫日誌中出現啟動JOB程式的TIMED OUT資訊資料庫
- ORA-27102: out of memory故障解決
- 解決bash: mysql: command not found的問題MySql
- Mac終端出現 brew command not found 解決Mac
- Detailed Item Cost Report (XML) timed out waiting for the Output Post-processor to finishAIXML