Connection reset by peer 的前世因緣
歷經了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