nested exception is io.lettuce.core.RedisException: java.io.IOException:远程主机关闭了一个连接

可尝试如下两个方案:

1、修改服务器ssh配置

加入如下配置:

ClientAliveInterval 600      
ClientAliveCountMax 10

保存,重启ssh服务。

2、设置连接池

spring:
  # Redis 配置
  redis:
    host: *.***.***.**
    port: 6379
    password: 123456
    timeout: 50s
    # 连接池
    lettuce:
      pool:
        max-idle: 30
        max-active: 8
        max-wait: 10000
        min-idle: 10

猜你喜欢

转载自blog.csdn.net/Stand_Fast/article/details/118971661