• 请不要在回答技术问题时复制粘贴 AI 生成的内容
findbrick
V2EX  ›  程序员

求助 spring cloud 长时间不操作 redis 报错

  •  
  •   findbrick · Aug 9, 2018 · 2829 views
    This topic created in 2854 days ago, the information mentioned may be changed or developed.

    报错信息: nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.

    使用的是:spring-boot-starter-data-redis redistemplate

    redis timeout 配置:10 秒钟

    解决方案: redis timeout 设置为 0 即不超时

    不知道 properties 是否有可以配置保持连接的参数

    2 replies    2018-08-09 17:00:34 +08:00
    zjp
        1
    zjp  
       Aug 9, 2018 via Android
    用连接池
    letitbesqzr
        2
    letitbesqzr  
       Aug 9, 2018
    检查下网络连接 以及 redis 的状态吧,spring-boot-starter-data-redis 使用了 commons-pool2 当连接池
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   963 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 20:35 · PVG 04:35 · LAX 13:35 · JFK 16:35
    ♥ Do have faith in what you're doing.