[ 
https://issues.apache.org/jira/browse/AXIS2-935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664613#action_12664613
 ] 

Rigadon commented on AXIS2-935:
-------------------------------

I have a similar issue, I think Guillaume's comments above are very pertinent. 
In particular, for point 3, the process is something like:

        AbstractHTTPSender.processResponse(HttpMethodBase httpMethod, 
MessageContext msgContext)

This sets the InputStream in the OperationContext:

        OperationContext opContext = msgContext.getOperationContext();
        if (opContext != null) {
                opContext.setProperty(MessageContext.TRANSPORT_IN, in);
        }

This then returns control back to HTTPSender.sendViaPost(MessageContext 
msgContext, URL url, String soapActionString) which calls cleanup(msgContext, 
postMethod);

        private void cleanup(MessageContext msgContext, HttpMethod method) {
                 if 
(msgContext.isPropertyTrue(HTTPConstants.AUTO_RELEASE_CONNECTION)) {
                         method.releaseConnection();
                 }
        }

Where the connection is released if HTTPConstants.AUTO_RELEASE_CONNECTION is 
set to TRUE. Which is fine, except that the stream is subsequently read by the 
process, and so fails with an IOException "Attempted read on closed stream".

We have tried (and failed) to code our way around this bug, but to no avail. 
Our latest solution is to go back to HTTP 1.0, I'll let y'all know how we get 
on :)

> Connections are not properly released causing them to stick in the 
> "CLOSE_WAIT" state and cause "Too many files open"
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-935
>                 URL: https://issues.apache.org/jira/browse/AXIS2-935
>             Project: 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
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>         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 
> SOAPOverHTTPSender.java the releaseConnection() is never called on the 
> postMethod variable.  This seems to be a likely candidate for the source of 
> the issue.
> See SOAPOverHTTPSender.java:97-118

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to