【RuoYi-Vue-Plus】问题笔记 07 - V3.5.0 Redisson 报错 Unable to send PING command over channel
生活随笔
收集整理的這篇文章主要介紹了
【RuoYi-Vue-Plus】问题笔记 07 - V3.5.0 Redisson 报错 Unable to send PING command over channel
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
文章目錄
- 前言
- 參考目錄
- 問題說明
- 問題解決方法
前言
最近找了一下終于解決了 Redisson 的 RedisTimeoutException 報錯問題,在此記錄一下。
參考目錄
- Redisson Issues#3273
- Redisson Issues#3876
問題說明
在使用框架的時候,如果長時間沒有進行操作,就會在控制臺出現 RedisTimeoutException 異常。異常信息如下:
2022-09-19 14:08:30 [redisson-timer-4-1] ERROR o.r.c.handler.PingConnectionHandler - Unable to send PING command over channel: [id: 0xde1b1d38, L:/127.0.0.1:7995 - R:localhost/127.0.0.1:6379] org.redisson.client.RedisTimeoutException: Command execution timeout for command: (PING), params: [], Redis client: [addr=redis://localhost:6379]at org.redisson.client.RedisConnection.lambda$async$0(RedisConnection.java:244)at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715)at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34)at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703)at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790)at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503)at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)at java.lang.Thread.run(Thread.java:748)雖然不影響使用,但是會一直在控制臺打印,看著很難受,找了一圈之后終于找到了解決方法。
問題解決方法
修改 Redisson 配置文件 RedisConfig
增加配置:
需要注意的是 Redisson 版本,Issues 中解決方法的版本是 3.14.0,在框架 V3.5.0 中 Redisson 版本 3.16.7,設置之后不生效,但是改為和 V4.3.0 一樣的最新版 3.17.6 后不再出現報錯。
默認的設置是 30s,修改之后是 10s。
總結
以上是生活随笔為你收集整理的【RuoYi-Vue-Plus】问题笔记 07 - V3.5.0 Redisson 报错 Unable to send PING command over channel的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 卸下浮躁 回归本心 回归技术
- 下一篇: 安装fastdfs http访问文件