Q:

Flash client c++ server connection reset by peer

We have application that involves C++ socket server, Flash client that communicates with C++ server and Python socket server that gives crossdomain.xml to Flash client.
C++ server calls REST operations and return the results the the Flash client. All of this is hosted on Linux 64bit server - Debian.
For some of our users we have a lots of "Connection reset by peer" when Game server tries to read from socket (on recv()). 
Flash policy server also have similar amount from "Connection reset by peer".
I'm looking for ideas, resources what is the reason about this problem. For sure this is not from server overload - what of users - sometimes is with 3 users, some times is with 300 users.
We tested on our private servers and the situation is the same.
What we've suspected to fix the problem:

Flash client problems to communicate with C++ server and over all with sockets.
Network problems
Some combination tcp options

What we've done:

Catch security and IO erros from the client. There we just log them :(

What we've think to do:

Change priority of the C++ server to -5 or -10 - I hope this can boost IO operations.

I know the reason for "Connection reset by pear" - I check lots of them in stackOverFlow and google for that - but I can't find way to overcome this issue.

A:

"Connection reset by peer" has nothing to do with server overload, it's a message telling you that the remote client (or some network equipment between you and the client) actively closed down the network connection.
It may be a sign of network trouble (home gateways thinking the connection timed out or your own firewall deciding connections are idle and timing out) or, maybe more likely, the client crashing or the user just navigating away from the page so the Flash client closes.
I don't think you'll easily be able to diagnose the problem without input from people actually having trouble. 

