My tool started getting intermittent connection reset by peer errors in the past few days. The tool automatically retries the connection after a 1 minute timeout up to 5 times and most of the time it is not enough:
11:50:04 PM Got 'Unable to read data from the transport connection: Connection reset by peer.', waiting for 00:01:00 11:51:05 PM Got 'Unable to read data from the transport connection: Connection reset by peer.', waiting for 00:01:00 11:52:05 PM Got 'Unable to read data from the transport connection: Connection reset by peer.', waiting for 00:01:00 11:53:05 PM Got 'Unable to read data from the transport connection: Connection reset by peer.', waiting for 00:01:00 11:54:05 PM Got 'Unable to read data from the transport connection: Connection reset by peer.', waiting for 00:01:00 After 5 retries: System.Net.WebException: Unable to read data from the transport connection: Connection reset by peer. ---> System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer
This coincided with the recent migration to k8s, but I'm not sure if it is actually related. My tool has been running successfully for over a decade without encountering such problems.