redis 之 Connection reset by peer

拼搏现实的明天。 2023-06-27 03:45 25阅读 0赞

Connection reset by peer 的前世因缘

redis之批量操作pipeline重写

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

先贴一下完整错误:

  1. exception: org.springframework.data.redis.connection.RedisPipelineException:
  2. Pipeline contained one or more invalid commands; nested exception is io.lettuce.core.RedisException:
  3. io.netty.channel.unix.Errors$NativeIoException:
  4. 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

发表评论

表情:
评论列表 (有 0 条评论,25人围观)

还没有评论,来说两句吧...

相关阅读