axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <>
Subject [jira] Commented: (AXIS2-935) Connections are not properly released causing them to stick in the "CLOSE_WAIT" state and cause "Too many files open"
Date Thu, 26 Oct 2006 15:16:17 GMT
    [ ] 
Oleg Kalnichevski commented on AXIS2-935:


I may not know the full extent and all the details of this particular problem, so take my
comment for what it is worth. 

The described problem is not that infrequent in the HttpClient world. Per default HttpClient
always attempts to keep HTTP connections alive for further re-use and may keep them in the
connection pool indefinitely. So, some precautions must be taken in order to ensure proper
release of network sockets.

(1) _Always_ shut down the multithreaded connection manager when it is no longer needed. It
may take a quite while on some JVMs before it gets garbage collected along with all the connections
and respective network sockets. If multithreaded connection managers are created frequently
and are not cleanly shut down, one can easily end up with hundreds of connections in the "CLOSE_WAIT"

(2) Calling #closeIdleConnections() once is a while is a good idea, especially when anticipating
(or coming back from) a long period of network inactivity. 


> Connections are not properly released causing them to stick in the "CLOSE_WAIT" state
and cause "Too many files open"
> ---------------------------------------------------------------------------------------------------------------------
>                 Key: AXIS2-935
>                 URL:
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.0
>         Environment: Weblogic 8.1.2, Solaris 8 (dont ask!)
>            Reporter: Jeff Peterson
>         Assigned To: Deepal Jayasinghe
>            Priority: Blocker
>         Attachments: AXIS2-935.patch
> It appears that org.apache.axis2.transport.http.SOAPOverHTTPSender does not properly
cleanup the http post connection after payload has been sent.
> The symptoms of this problem show up in `netstat` as literally hundreds of connections
in the "CLOSE_WAIT" state.  On a busy server this can cause the application to report exceptions
with the message "Too many open files."
> I looked in the source code for axis2 1.0 and discovered that in
the releaseConnection() is never called on the postMethod variable.  This seems to be a likely
candidate for the source of the issue.
> See

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message