V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
findbrick
V2EX  ›  程序员

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

  •  
  •   findbrick · 2018-08-09 09:04:29 +08:00 · 2011 次点击
    这是一个创建于 2079 天前的主题,其中的信息可能已经有所发展或是发生改变。

    报错信息: 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 条回复    2018-08-09 17:00:34 +08:00
    zjp
        1
    zjp  
       2018-08-09 10:08:18 +08:00 via Android
    用连接池
    letitbesqzr
        2
    letitbesqzr  
       2018-08-09 17:00:34 +08:00
    检查下网络连接 以及 redis 的状态吧,spring-boot-starter-data-redis 使用了 commons-pool2 当连接池
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   959 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 21:19 · PVG 05:19 · LAX 14:19 · JFK 17:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.