[Ace-users] How to handle WSAECONNRESET error?
weiping_guo at yahoo.com
Wed Jul 25 13:15:19 CDT 2007
ACE VERSION: 5.5.8
HOST MACHINE and OPERATING SYSTEM: Windows XP
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]: win-32
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/
(used by MPC when you generate your own makefiles):
DOES THE PROBLEM AFFECT:
OTHER (please specify)?
[Please indicate whether ACE, your application, or both are
WSAECONNRESET was returned in the handle_input() recv.
I am building a server using ACE and SSL. The code is done, now I am
testing the performance of the system. However, the result is quite
The test environment looks like:
Test Client -- > server --> Test Server
The server is our program. The test client just spawned a lot of
threads and setup tcp connection with the server. Server setup tcp
connetions with Test Server. The Test Server echoes the package back.
All four components are in the LAN.
The problem is when the thread number increased, say 50 threads (50
connections), and each thread send out 1000 package (small package
with 100bytes). For some connections, before the data transmission is
done, the server reported an error with error code WSAECONNRESET
By tracing the TCP packets between test client and server, I found
Test Client send to a server "TCP out-of-order'
The Server reponsed with 'RST' (reset the connction).
The Test Client responded with RST ACK.
Since the server received -1, then -1 is returned from handle_input(),
and handle_close in turn is called. The underlying socket is closed.
However, the test client still believes the connection is alive and
trying to write data to the socket. Then writer error occurs aborted.
How should I handle WSAECONNRESET error? I was trying to ignore it but
apprantely it was not good idea. The error keeps popup.
Any suggestion and comments are appreciated. Thanks.
[What you did to get the error; include test program or session
transcript if at all possible. ]
[If available ]
More information about the Ace-users