axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beauchamp, Matthew" <>
Subject file descriptor leak in axis2c client api
Date Fri, 17 Nov 2006 19:06:19 GMT
In using the client API I'm seeing leaked file descriptors due to not
calling close on the sockets after their connections are finished.  To
illustrate where I'm seeing this I'll describe my application.  My
service has a "publish" operation (in-out MEP) that clients send
commands to.  The response they get back is a status indicating the
command was received successfully.  My service also creates a new thread
when it is first constructed that reads command responses off of a queue
and uses the axis2c client api to "publish" these responses back to
clients.  Everytime it takes a response from the queue the thread
allocates, sets options, does a SEND_RECEIVE, FINALIZE_INVOKE, and frees
the svc_client.  After about 250 messages I get an "I/O Error: too many
open files" from the system, and checking the process's file descriptors
shows many TCP sockets in a CLOSE_WAIT state.  By the way, I forgot to
mention that I'm running on solaris 8, which may of course be the
problem.  I'm wondering though if the same thing happens under these
conditions when running on Linux.  In looking through the code I see
that the http_client is added to the msg_ctx in the
soap_over_http_sender, and there is a comment in the code saying it will
be free'd elsewhere.  However, I am unable to locate where the
http_client is actually free'd, and print statements I placed in the
axis2_http_client_free function never show up in my runs.  Any help
anyone could provide would be much appreciated.

View raw message