redis server response timeout(3000ms) occurred after 3 retry attempts异常分析

读取redis数据报超时错误:

 Redis server response timeout (3000 ms) occured after 3 retry attempts

在这里插入图片描述

2024-07-18 17:07:57.124 ERROR [e8f07b0a671c08311dff589827897232] [http-nio-9528-exec-6] c.z.i.u.m.c.e.BaspUserExceptionHandler.exceptionHandler:83 - RuntimeException:java.util.concurrent.ExecutionException: org.springframework.dao.QueryTimeoutException:
 Redis server response timeout (3000 ms) occured after 3 retry attempts, 
 is non-idempotent command: false Check connection with Redis node:  for TCP packet drops.  
 Try to increase nettyThreads and/or timeout settings. Command: (LRANGE), params: [[118, 111, 108, 116, 101, 58, 111, 114, 103, 58, ...], 0, -1], channel: [];
  nested exception is org.redisson.client.RedisResponseTimeoutException: Redis server response timeout (3000 ms) occured after 3 retry attempts, is non-idempotent command: false Check connection with Redis node:  for TCP packet drops.  Try to increase nettyThreads and/or timeout settings. Command: 

问题排查

  • 根据报错后的提示,将客户端超时时间改大一些。
  • 通过异常分析,发现出现异常的地方为set操作,一分析,是value值过大,导致超时。

在这里插入图片描述

  • 确认问题发生时的操作,若为执行操作时Key值过大,也会造成超时报错。一般建议key不要超过10KB。
    单key大小,Redis限制每个String类型value大小不超过512MB,
    实际开发中,不要超过10KB,否则会对CPU和网卡造成极大负载。
    hash、list、set、zset元素个数不要超过5000。
    理论上限: 每个hashset里元素数量< 2^32。

根据报错后的提示,将客户端参数PingConnectionInterval调大试试。

查看redisson配置,调大参数PingConnectionInterval
在这里插入图片描述

相关推荐

  1. 异常类型处理 3.0

    2024-07-19 00:12:04       30 阅读
  2. .NET Core HttpClient请求异常分析

    2024-07-19 00:12:04       49 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-19 00:12:04       67 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-19 00:12:04       71 阅读
  3. 在Django里面运行非项目文件

    2024-07-19 00:12:04       58 阅读
  4. Python语言-面向对象

    2024-07-19 00:12:04       69 阅读

热门阅读

  1. UFS协议

    2024-07-19 00:12:04       22 阅读
  2. 透过三星Galaxy Z Fold6,看见高效生活的未来图景

    2024-07-19 00:12:04       20 阅读
  3. 设计模式之观察者模式

    2024-07-19 00:12:04       20 阅读
  4. 微服务拆分流程 (黑马商城拆分商品服务)

    2024-07-19 00:12:04       19 阅读
  5. C# 邮件发送

    2024-07-19 00:12:04       23 阅读
  6. Repl.it: 在线的集成开发环境

    2024-07-19 00:12:04       25 阅读
  7. js基础知识

    2024-07-19 00:12:04       26 阅读
  8. vivado H_SET and HU_SET

    2024-07-19 00:12:04       21 阅读
  9. xhdra的使用记录

    2024-07-19 00:12:04       20 阅读
  10. Docker无网环境下配置方法

    2024-07-19 00:12:04       19 阅读
  11. 手动实现堵塞队列

    2024-07-19 00:12:04       25 阅读