redis 之 Connection reset by peer

Connection reset by peer 的前世因缘

redis之批量操作pipeline重写

历经了99八十一难,这个问题在大佬的帮助下(我摊牌了,其实就是大佬独立解决的,雨我无瓜)终于解决了。

先贴一下完整错误:

exception: org.springframework.data.redis.connection.RedisPipelineException: 
Pipeline contained one or more invalid commands; nested exception is io.lettuce.core.RedisException: 
io.netty.channel.unix.Errors$NativeIoException: 
syscall:read(..) failed: Connection reset by peer

Connection reset by peer 产生的原因

从各种资料来看,这个问题的原因应该就是出现在了网络断开的前提下的。

大佬总结了几点会发生 Connection reset by peer 的情况 :

在这里插入图片描述
redis服务器和客户端的简单图解
在这里插入图片描述

根据以上内容总结一下,大概有一下标红的点会发生问题:
在这里插入图片描述


解决方法

根据这几个推断,修改如下的redis配置:
在这里插入图片描述
在这里插入图片描述


优化后的结果对比

在这里插入图片描述
在这里插入图片描述

搜索日志中的错误信息,果然已经消失不见了。

事情完满解决!收工。

大佬的参考链接:
https://blog.csdn.net/xc_zhou/article/details/80950753
https://yq.aliyun.com/articles/714374
https://stackoverflow.com/questions/1434451/what-does-connection-reset-by-peer-mean
https://blog.csdn.net/crisis_hiding/article/details/81490158
https://blog.csdn.net/sinat_36629696/article/details/80740678

  • 6
    点赞
  • 40
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值