TarsJava icon indicating copy to clipboard operation
TarsJava copied to clipboard

是否有人遇到过Connection reset by peer的错误日志?

Open mofaxiaoyuan opened this issue 1 year ago • 1 comments

Caused by: rpc.exc.ClientException: xxxx.xxxxServer.xxxxObj|Connection reset by peer|172.xx.xx.xx:10003 Caused by: java.io.IOException: Connection reset by peer|172.xx.xx.xx:10003 at client.rpc.ServantClient.invokeWithSync(ServantClient.java:124)

服务间调用client端偶发性Connection reset by peer,从日志上看server没有收到请求

mofaxiaoyuan avatar Dec 10 '24 03:12 mofaxiaoyuan

  • 可以进微信群里讨论交流
  • 这个问题大概率是 稀疏连接场景,在发起请求的过程中,连接被对端的空闲连接检测给关闭了;
  • 一个解决方法:客户端判断连接快要过期了(提前5s),重新建立连接. (这个需要框架支持.)

walkertest avatar Dec 10 '24 03:12 walkertest