WatsonTcp: Unable to write data to the transport connection: Broken pipe.
Created a discussion about this earlier as I figured it was something common enough that I’ve probably messed up on my end, but the issue has been bugging me for weeks now and I haven’t been able to find the cause.
After observing it some more, at some point during the session there will appear an Unable to write data to the transport connection: Broken pipe.
exception. I don’t know what exactly happens client-side for this exception to trigger, but when it happens it seems to massively snowball until the server is unable to handle connections and disconnections and eventually becomes unresponsive.
I’d love to hear any ideas about tackling this, and please let me know if there’s any relevant connection related code I can post that would make sense to look into. It’s becoming a massive problem in my game and requiring constant attention from me.
Thanks!
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15
Restructured some things and started using
Server.SendAsync
instead ofServer.Send
and the issues appear a bit clearer now. It seems that there are 2 exceptions that lead to theBroken pipe
andCannot access a disposed object
spam. More commonly it seems to beConnection timed out
exception and more rarelyNo route to host
. I haven’t enabled Keepalives by the way. After running into one of them, the server logs theCannot access a disposed object
exception hundreds of times. Now using the asynchronous methods it doesn’t clog up the entire traffic anymore and the problem doesn’t appear to cause as many issues (if any).Still trying to come up with a way to reproduce the issue outside of production, will post the code here when/if I succeed.