You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Kang, Kamaljeet K." <Ka...@tellabs.com> on 2007/05/03 22:15:53 UTC

AbstractHTTPSender not releasing connection

Hi,

As per HTTPClient documentation if you are using
MultiThreadedhttpConnectionManager then for every
HttpClient.executeMethod there has to be corresponding
'releaseConnection' call. I do not see AbstractHttpSender releasing
connection anywhere in the code. Is this the reason why even after using
REUSE_HTTP_CLIENT, we see new HTTP connection created for every
request/response?



Thanks

Kamal
============================================================
The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any reproduction,
dissemination or distribution of this communication is strictly
prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and
deleting it from your computer. Thank you. Tellabs
============================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Dims,

unfortunately there are still tonns of connections in CLOSE_WAIT state
(it does not crashes only because I'm running on Mac OS X -- which has a
limit set to an higher value, on Linux it crashes after a few minutes).
I've tried with version 1.2 and by caching the operation context.

Michele

On Fri, 2007-05-04 at 12:08 -0400, Davanum Srinivas wrote:
> I have linked the 2 issues. Let's wait to hear from Michele on my
> latest suggestions
> 
> thanks,
> dims
> 
> On 5/4/07, Cox, Brian (GE Infra, Energy) <br...@ge.com> wrote:
> > I believe this JIRA is also related:
> >
> > http://issues.apache.org/jira/browse/AXIS2-935
> >
> >
> >
> >  -----Original Message-----
> > From:   Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > Sent:   Friday, May 04, 2007 10:12 AM
> > To:     axis2
> > Subject:        Re: AbstractHTTPSender not releasing connection
> >
> > Dims,
> >
> > please see here
> > https://issues.apache.org/jira/browse/AXIS2-2593
> >
> >
> > Michele
> >
> > On Fri, 2007-05-04 at 09:59 -0400, Davanum Srinivas wrote:
> > > Michele,
> > >
> > > Here's what is see in the http client code:
> > > http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
> > >
> > >    /** The default maximum number of connections allowed per host */
> > >     public static final int DEFAULT_MAX_HOST_CONNECTIONS = 2;   // Per
> > > RFC 2616 sec 8.1.4
> > >
> > >     /** The default maximum number of connections allowed overall */
> > >     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;
> > >
> > > Could the new threads being created because the old ones are still in
> > > progress? can you bump up the default limits and try?
> > >
> > > -- dims
> > >
> > > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > > Dims,
> > > >
> > > > even if the HttpClient is cached new connections are created every 3/4
> > > > requests.
> > > >
> > > > Michele
> > > >
> > > > On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > > > > Kamaljeet,
> > > > >
> > > > > can you try the 2nd option here:
> > > > > http://wso2.org/library/87
> > > > >
> > > > > -- dims
> > > > >
> > > > > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I turned the HttpClient log on and from the log it looks like new
> > > > > > connection is created for every request. I am sending request every 1
> > > > > > sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> > > > > > releasing the connection back to the pool so
> > > > > > 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> > > > > > 1 use.
> > > > > >
> > > > > >
> > > > > >
> > > > > > >>>>>>>> Log
> > > > > >
> > > > > > 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > > > > > waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > **********ProbCause*****PROP_TEST
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> > > > > > garbage collector,
> > > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> > > > > > on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > Kamal
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > > > > > Sent: Friday, May 04, 2007 4:22 AM
> > > > > > To: axis-user@ws.apache.org
> > > > > > Subject: Re: AbstractHTTPSender not releasing connection
> > > > > >
> > > > > > Hi Kamal,
> > > > > >
> > > > > > HttpClient by default uses persistent (keep alive) connections, however
> > > > > > every few requests a new connection is created.
> > > > > >
> > > > > > Michele
> > > > > >
> > > > > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > As per HTTPClient documentation if you are using
> > > > > > > MultiThreadedhttpConnectionManager then for every
> > > > > > > HttpClient.executeMethod there has to be corresponding
> > > > > > > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > > > > > > connection anywhere in the code. Is this the reason why even after
> > > > > > using
> > > > > > > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > > > > > > request/response?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Thanks
> > > > > > >
> > > > > > > Kamal
> > > > > > > ============================================================
> > > > > > > The information contained in this message may be privileged
> > > > > > > and confidential and protected from disclosure. If the reader
> > > > > > > of this message is not the intended recipient, or an employee
> > > > > > > or agent responsible for delivering this message to the
> > > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > > dissemination or distribution of this communication is strictly
> > > > > > > prohibited. If you have received this communication in error,
> > > > > > > please notify us immediately by replying to the message and
> > > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > > ============================================================
> > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > >
> > > > > >
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > ============================================================
> > > > > > The information contained in this message may be privileged
> > > > > > and confidential and protected from disclosure. If the reader
> > > > > > of this message is not the intended recipient, or an employee
> > > > > > or agent responsible for delivering this message to the
> > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > dissemination or distribution of this communication is strictly
> > > > > > prohibited. If you have received this communication in error,
> > > > > > please notify us immediately by replying to the message and
> > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > ============================================================
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Davanum Srinivas <da...@gmail.com>.
I have linked the 2 issues. Let's wait to hear from Michele on my
latest suggestions

thanks,
dims

On 5/4/07, Cox, Brian (GE Infra, Energy) <br...@ge.com> wrote:
> I believe this JIRA is also related:
>
> http://issues.apache.org/jira/browse/AXIS2-935
>
>
>
>  -----Original Message-----
> From:   Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> Sent:   Friday, May 04, 2007 10:12 AM
> To:     axis2
> Subject:        Re: AbstractHTTPSender not releasing connection
>
> Dims,
>
> please see here
> https://issues.apache.org/jira/browse/AXIS2-2593
>
>
> Michele
>
> On Fri, 2007-05-04 at 09:59 -0400, Davanum Srinivas wrote:
> > Michele,
> >
> > Here's what is see in the http client code:
> > http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
> >
> >    /** The default maximum number of connections allowed per host */
> >     public static final int DEFAULT_MAX_HOST_CONNECTIONS = 2;   // Per
> > RFC 2616 sec 8.1.4
> >
> >     /** The default maximum number of connections allowed overall */
> >     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;
> >
> > Could the new threads being created because the old ones are still in
> > progress? can you bump up the default limits and try?
> >
> > -- dims
> >
> > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > Dims,
> > >
> > > even if the HttpClient is cached new connections are created every 3/4
> > > requests.
> > >
> > > Michele
> > >
> > > On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > > > Kamaljeet,
> > > >
> > > > can you try the 2nd option here:
> > > > http://wso2.org/library/87
> > > >
> > > > -- dims
> > > >
> > > > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > > > > Hi,
> > > > >
> > > > > I turned the HttpClient log on and from the log it looks like new
> > > > > connection is created for every request. I am sending request every 1
> > > > > sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> > > > > releasing the connection back to the pool so
> > > > > 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> > > > > 1 use.
> > > > >
> > > > >
> > > > >
> > > > > >>>>>>>> Log
> > > > >
> > > > > 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > > > > waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > **********ProbCause*****PROP_TEST
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> > > > > garbage collector,
> > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> > > > > on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
> > > > >
> > > > >
> > > > >
> > > > > Thanks
> > > > >
> > > > > Kamal
> > > > >
> > > > > -----Original Message-----
> > > > > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > > > > Sent: Friday, May 04, 2007 4:22 AM
> > > > > To: axis-user@ws.apache.org
> > > > > Subject: Re: AbstractHTTPSender not releasing connection
> > > > >
> > > > > Hi Kamal,
> > > > >
> > > > > HttpClient by default uses persistent (keep alive) connections, however
> > > > > every few requests a new connection is created.
> > > > >
> > > > > Michele
> > > > >
> > > > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > > > > Hi,
> > > > > >
> > > > > > As per HTTPClient documentation if you are using
> > > > > > MultiThreadedhttpConnectionManager then for every
> > > > > > HttpClient.executeMethod there has to be corresponding
> > > > > > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > > > > > connection anywhere in the code. Is this the reason why even after
> > > > > using
> > > > > > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > > > > > request/response?
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > Kamal
> > > > > > ============================================================
> > > > > > The information contained in this message may be privileged
> > > > > > and confidential and protected from disclosure. If the reader
> > > > > > of this message is not the intended recipient, or an employee
> > > > > > or agent responsible for delivering this message to the
> > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > dissemination or distribution of this communication is strictly
> > > > > > prohibited. If you have received this communication in error,
> > > > > > please notify us immediately by replying to the message and
> > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > ============================================================
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > >
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > ============================================================
> > > > > The information contained in this message may be privileged
> > > > > and confidential and protected from disclosure. If the reader
> > > > > of this message is not the intended recipient, or an employee
> > > > > or agent responsible for delivering this message to the
> > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > dissemination or distribution of this communication is strictly
> > > > > prohibited. If you have received this communication in error,
> > > > > please notify us immediately by replying to the message and
> > > > > deleting it from your computer. Thank you. Tellabs
> > > > > ============================================================
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Davanum Srinivas <da...@gmail.com>.
I did mean the 2nd way. Could you please share your test case so that
i can try to recreate the problem?

thanks,
dims

On 5/5/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> Dims,
>
> what do you mean?
>
> Maybe there has been a misunderstanding, I'll try to restate the issue.
> You suggested me to cache the operation context, then to get the
> message context and thus clean up the resources, right?
> When should I call
>
> messageContext.getTransportOut().getSender().cleanup(messageContext);
> ?,
> just after sending the request, i.e.
> sender.invokeNonBlocking(request, callback);
> // get the msg. context and cleanup, as mentioned above
>
> or
> sender.invokeNonBloking(request, callback);
> and in callback.onComplete/onError free the resources?
>
> I've tried the second way (i.e. the resources are freed only when the
> response is received), without success.
> The first way, if NIO sockets are used (but I think it's not the case
> of Axis2, at least a present) has the potential problem of closing
> the connection before the message is effectively sent (because of the
> asynchronous communication). Does it make sense?
> I'll try the first method as well, but I guess I won't solve the
> problem because after just a few minutes netstat shows a huge number
> of connections in CLOSE_WAIT (about 1000).
>
>
> Michele
>
> On 4 May 2007, at 21:10, Davanum Srinivas wrote:
>
> > Do you have a stripped down test?
> >
> > thanks,
> > dims
> >
> > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> >> I've tried it (see my previous post), but with no success :(.
> >> BTW, since I'm using asynchronous invocations (with a separate
> >> channel for responses) I guess the connection should be closes
> >> immediately after sending the request, not after receiving the
> >> response. Am I right?
> >>
> >> Michele
> >> On 4 May 2007, at 20:41, Davanum Srinivas wrote:
> >>
> >> > Resending email...somehow this did not make it to the list. Can you
> >> > please try this?
> >> >
> >> > -- dims
> >> >
> >> > ---------- Forwarded message ----------
> >> > From: Davanum Srinivas <da...@gmail.com>
> >> > Date: May 4, 2007 11:25 AM
> >> > Subject: Re: AbstractHTTPSender not releasing connection
> >> > To: axis-user@ws.apache.org
> >> >
> >> >
> >> > Ok then try this tactic. Can you get hold of the
> >> OperationContext for
> >> > each invocation? Typically you can use
> >> > myServiceContext.getLastOperationContext() to get the last
> >> > OperationContext. You will have to start caching them though by
> >> > calling myServiceClient.setCachingOperationContext(true) or you can
> >> > create the OperationContext by calling
> >> > myServiceContext.createOperationContext as well. Either way
> >> after the
> >> > invocation is done you can call the following snippet to cleanup
> >> the
> >> > HttpMethod.
> >> >
> >> > myOperationContext.getMessageContext
> >> > (WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
> >> > _messageContext.getTransportOut().getSender().cleanup
> >> > (_messageContext);
> >> >
> >> > thanks,
> >> > dims
> >> >
> >> > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> >> >> Dims,
> >> >>
> >> >> what do you mean by "calling the complete method"?. In this
> >> >> scenario I'm
> >> >> using simple ServiceClient(s) sharing the same conf. context and
> >> >> attached to custom callbacks (I'm reusing the same
> >> ServiceClients for
> >> >> thousands of asynchronous requests).
> >> >> For my knowledge (see the link below) the cleanup (on the
> >> >> ServiceClient)
> >> >> should be called only at the end which, as I said, is after
> >> receiving
> >> >> thousands of responses.
> >> >> Are you then suggesting me to share an OperationClient for all my
> >> >> requests and to free resources as soon as I receive the response?
> >> >>
> >> >> Thanks,
> >> >> Michele
> >> >
> >> >
> >> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> >
> >
> > --
> > Davanum Srinivas :: http://davanum.wordpress.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Dims,

what do you mean?

Maybe there has been a misunderstanding, I'll try to restate the issue.
You suggested me to cache the operation context, then to get the  
message context and thus clean up the resources, right?
When should I call

messageContext.getTransportOut().getSender().cleanup(messageContext);
?,
just after sending the request, i.e.
sender.invokeNonBlocking(request, callback);
// get the msg. context and cleanup, as mentioned above

or
sender.invokeNonBloking(request, callback);
and in callback.onComplete/onError free the resources?

I've tried the second way (i.e. the resources are freed only when the  
response is received), without success.
The first way, if NIO sockets are used (but I think it's not the case  
of Axis2, at least a present) has the potential problem of closing  
the connection before the message is effectively sent (because of the  
asynchronous communication). Does it make sense?
I'll try the first method as well, but I guess I won't solve the  
problem because after just a few minutes netstat shows a huge number  
of connections in CLOSE_WAIT (about 1000).


Michele

On 4 May 2007, at 21:10, Davanum Srinivas wrote:

> Do you have a stripped down test?
>
> thanks,
> dims
>
> On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
>> I've tried it (see my previous post), but with no success :(.
>> BTW, since I'm using asynchronous invocations (with a separate
>> channel for responses) I guess the connection should be closes
>> immediately after sending the request, not after receiving the
>> response. Am I right?
>>
>> Michele
>> On 4 May 2007, at 20:41, Davanum Srinivas wrote:
>>
>> > Resending email...somehow this did not make it to the list. Can you
>> > please try this?
>> >
>> > -- dims
>> >
>> > ---------- Forwarded message ----------
>> > From: Davanum Srinivas <da...@gmail.com>
>> > Date: May 4, 2007 11:25 AM
>> > Subject: Re: AbstractHTTPSender not releasing connection
>> > To: axis-user@ws.apache.org
>> >
>> >
>> > Ok then try this tactic. Can you get hold of the  
>> OperationContext for
>> > each invocation? Typically you can use
>> > myServiceContext.getLastOperationContext() to get the last
>> > OperationContext. You will have to start caching them though by
>> > calling myServiceClient.setCachingOperationContext(true) or you can
>> > create the OperationContext by calling
>> > myServiceContext.createOperationContext as well. Either way  
>> after the
>> > invocation is done you can call the following snippet to cleanup  
>> the
>> > HttpMethod.
>> >
>> > myOperationContext.getMessageContext
>> > (WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
>> > _messageContext.getTransportOut().getSender().cleanup
>> > (_messageContext);
>> >
>> > thanks,
>> > dims
>> >
>> > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
>> >> Dims,
>> >>
>> >> what do you mean by "calling the complete method"?. In this
>> >> scenario I'm
>> >> using simple ServiceClient(s) sharing the same conf. context and
>> >> attached to custom callbacks (I'm reusing the same  
>> ServiceClients for
>> >> thousands of asynchronous requests).
>> >> For my knowledge (see the link below) the cleanup (on the
>> >> ServiceClient)
>> >> should be called only at the end which, as I said, is after  
>> receiving
>> >> thousands of responses.
>> >> Are you then suggesting me to share an OperationClient for all my
>> >> requests and to free resources as soon as I receive the response?
>> >>
>> >> Thanks,
>> >> Michele
>> >
>> >  
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> > For additional commands, e-mail: axis-user-help@ws.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>
> -- 
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Davanum Srinivas <da...@gmail.com>.
Do you have a stripped down test?

thanks,
dims

On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> I've tried it (see my previous post), but with no success :(.
> BTW, since I'm using asynchronous invocations (with a separate
> channel for responses) I guess the connection should be closes
> immediately after sending the request, not after receiving the
> response. Am I right?
>
> Michele
> On 4 May 2007, at 20:41, Davanum Srinivas wrote:
>
> > Resending email...somehow this did not make it to the list. Can you
> > please try this?
> >
> > -- dims
> >
> > ---------- Forwarded message ----------
> > From: Davanum Srinivas <da...@gmail.com>
> > Date: May 4, 2007 11:25 AM
> > Subject: Re: AbstractHTTPSender not releasing connection
> > To: axis-user@ws.apache.org
> >
> >
> > Ok then try this tactic. Can you get hold of the OperationContext for
> > each invocation? Typically you can use
> > myServiceContext.getLastOperationContext() to get the last
> > OperationContext. You will have to start caching them though by
> > calling myServiceClient.setCachingOperationContext(true) or you can
> > create the OperationContext by calling
> > myServiceContext.createOperationContext as well. Either way after the
> > invocation is done you can call the following snippet to cleanup the
> > HttpMethod.
> >
> > myOperationContext.getMessageContext
> > (WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
> > _messageContext.getTransportOut().getSender().cleanup
> > (_messageContext);
> >
> > thanks,
> > dims
> >
> > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> >> Dims,
> >>
> >> what do you mean by "calling the complete method"?. In this
> >> scenario I'm
> >> using simple ServiceClient(s) sharing the same conf. context and
> >> attached to custom callbacks (I'm reusing the same ServiceClients for
> >> thousands of asynchronous requests).
> >> For my knowledge (see the link below) the cleanup (on the
> >> ServiceClient)
> >> should be called only at the end which, as I said, is after receiving
> >> thousands of responses.
> >> Are you then suggesting me to share an OperationClient for all my
> >> requests and to free resources as soon as I receive the response?
> >>
> >> Thanks,
> >> Michele
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
I've tried it (see my previous post), but with no success :(.
BTW, since I'm using asynchronous invocations (with a separate  
channel for responses) I guess the connection should be closes  
immediately after sending the request, not after receiving the  
response. Am I right?

Michele
On 4 May 2007, at 20:41, Davanum Srinivas wrote:

> Resending email...somehow this did not make it to the list. Can you
> please try this?
>
> -- dims
>
> ---------- Forwarded message ----------
> From: Davanum Srinivas <da...@gmail.com>
> Date: May 4, 2007 11:25 AM
> Subject: Re: AbstractHTTPSender not releasing connection
> To: axis-user@ws.apache.org
>
>
> Ok then try this tactic. Can you get hold of the OperationContext for
> each invocation? Typically you can use
> myServiceContext.getLastOperationContext() to get the last
> OperationContext. You will have to start caching them though by
> calling myServiceClient.setCachingOperationContext(true) or you can
> create the OperationContext by calling
> myServiceContext.createOperationContext as well. Either way after the
> invocation is done you can call the following snippet to cleanup the
> HttpMethod.
>
> myOperationContext.getMessageContext 
> (WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
> _messageContext.getTransportOut().getSender().cleanup 
> (_messageContext);
>
> thanks,
> dims
>
> On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
>> Dims,
>>
>> what do you mean by "calling the complete method"?. In this  
>> scenario I'm
>> using simple ServiceClient(s) sharing the same conf. context and
>> attached to custom callbacks (I'm reusing the same ServiceClients for
>> thousands of asynchronous requests).
>> For my knowledge (see the link below) the cleanup (on the  
>> ServiceClient)
>> should be called only at the end which, as I said, is after receiving
>> thousands of responses.
>> Are you then suggesting me to share an OperationClient for all my
>> requests and to free resources as soon as I receive the response?
>>
>> Thanks,
>> Michele
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Fwd: AbstractHTTPSender not releasing connection

Posted by Davanum Srinivas <da...@gmail.com>.
Resending email...somehow this did not make it to the list. Can you
please try this?

-- dims

---------- Forwarded message ----------
From: Davanum Srinivas <da...@gmail.com>
Date: May 4, 2007 11:25 AM
Subject: Re: AbstractHTTPSender not releasing connection
To: axis-user@ws.apache.org


Ok then try this tactic. Can you get hold of the OperationContext for
each invocation? Typically you can use
myServiceContext.getLastOperationContext() to get the last
OperationContext. You will have to start caching them though by
calling myServiceClient.setCachingOperationContext(true) or you can
create the OperationContext by calling
myServiceContext.createOperationContext as well. Either way after the
invocation is done you can call the following snippet to cleanup the
HttpMethod.

myOperationContext.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
_messageContext.getTransportOut().getSender().cleanup(_messageContext);

thanks,
dims

On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> Dims,
>
> what do you mean by "calling the complete method"?. In this scenario I'm
> using simple ServiceClient(s) sharing the same conf. context and
> attached to custom callbacks (I'm reusing the same ServiceClients for
> thousands of asynchronous requests).
> For my knowledge (see the link below) the cleanup (on the ServiceClient)
> should be called only at the end which, as I said, is after receiving
> thousands of responses.
> Are you then suggesting me to share an OperationClient for all my
> requests and to free resources as soon as I receive the response?
>
> Thanks,
> Michele

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: AbstractHTTPSender not releasing connection

Posted by "Kang, Kamaljeet K." <Ka...@tellabs.com>.
Is it okay not to release the connection back to the pool?

This is from HttpClient site

>>To safely ensure connection release HttpClient should be used in the
>>following manner
  >>// and then from inside some thread executing a method
        GetMethod get = new GetMethod("http://jakarta.apache.org/");
        try {
            client.executeMethod(get);
            // print response to stdout
            System.out.println(get.getResponseBodyAsStream());
        } finally {
            // be sure the connection is released back to the connection

            // manager
            get.releaseConnection();
        }

Kamal

-----Original Message-----
From: Davanum Srinivas [mailto:davanum@gmail.com] 
Sent: Friday, May 04, 2007 10:18 AM
To: axis-user@ws.apache.org
Subject: Re: AbstractHTTPSender not releasing connection

Guess the only work around is the tuning parameters as mentioned
there...so it's a no-op fo us. There's nothing we can do..is there?

-- dims

On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> Dims,
>
> please see here
> https://issues.apache.org/jira/browse/AXIS2-2593
>
>
> Michele
>
> On Fri, 2007-05-04 at 09:59 -0400, Davanum Srinivas wrote:
> > Michele,
> >
> > Here's what is see in the http client code:
> >
http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/
src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManage
r.java
> >
> >    /** The default maximum number of connections allowed per host */
> >     public static final int DEFAULT_MAX_HOST_CONNECTIONS = 2;   //
Per
> > RFC 2616 sec 8.1.4
> >
> >     /** The default maximum number of connections allowed overall */
> >     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;
> >
> > Could the new threads being created because the old ones are still
in
> > progress? can you bump up the default limits and try?
> >
> > -- dims
> >
> > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > Dims,
> > >
> > > even if the HttpClient is cached new connections are created every
3/4
> > > requests.
> > >
> > > Michele
> > >
> > > On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > > > Kamaljeet,
> > > >
> > > > can you try the 2nd option here:
> > > > http://wso2.org/library/87
> > > >
> > > > -- dims
> > > >
> > > > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > > > > Hi,
> > > > >
> > > > > I turned the HttpClient log on and from the log it looks like
new
> > > > > connection is created for every request. I am sending request
every 1
> > > > > sec so connection shouldn't idle out. I think,
AbstractHTTPSender is not
> > > > > releasing the connection back to the pool so
> > > > > 'MultiThreadedHttpConnectionManager cleanup' thread is
trashing it after
> > > > > 1 use.
> > > > >
> > > > >
> > > > >
> > > > > >>>>>>>> Log
> > > > >
> > > > > 04-May 08:11:22,184 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > > > > waiting...,
hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > **********ProbCause*****PROP_TEST
> > > > > 04-May 08:52:15,369 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - Connection
reclaimed by
> > > > > garbage collector,
> > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > 04-May 08:52:15,369 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > >
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > 04-May 08:52:15,369 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > >
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > 04-May 08:52:15,369 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - Notifying
thread waiting
> > > > > on host pool,
hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > 04-May 08:52:15,369 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > > >
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > 04-May 08:52:15,369 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process
request
> > > > >
> > > > >
> > > > >
> > > > > Thanks
> > > > >
> > > > > Kamal
> > > > >
> > > > > -----Original Message-----
> > > > > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > > > > Sent: Friday, May 04, 2007 4:22 AM
> > > > > To: axis-user@ws.apache.org
> > > > > Subject: Re: AbstractHTTPSender not releasing connection
> > > > >
> > > > > Hi Kamal,
> > > > >
> > > > > HttpClient by default uses persistent (keep alive)
connections, however
> > > > > every few requests a new connection is created.
> > > > >
> > > > > Michele
> > > > >
> > > > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > > > > Hi,
> > > > > >
> > > > > > As per HTTPClient documentation if you are using
> > > > > > MultiThreadedhttpConnectionManager then for every
> > > > > > HttpClient.executeMethod there has to be corresponding
> > > > > > 'releaseConnection' call. I do not see AbstractHttpSender
releasing
> > > > > > connection anywhere in the code. Is this the reason why even
after
> > > > > using
> > > > > > REUSE_HTTP_CLIENT, we see new HTTP connection created for
every
> > > > > > request/response?
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > Kamal
> > > > > > ============================================================
> > > > > > The information contained in this message may be privileged
> > > > > > and confidential and protected from disclosure. If the
reader
> > > > > > of this message is not the intended recipient, or an
employee
> > > > > > or agent responsible for delivering this message to the
> > > > > > intended recipient, you are hereby notified that any
reproduction,
> > > > > > dissemination or distribution of this communication is
strictly
> > > > > > prohibited. If you have received this communication in
error,
> > > > > > please notify us immediately by replying to the message and
> > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > ============================================================
> > > > > >
> > > > > >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
axis-user-help@ws.apache.org
> > > > > >
> > > > >
> > > > >
> > > > >
---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > ============================================================
> > > > > The information contained in this message may be privileged
> > > > > and confidential and protected from disclosure. If the reader
> > > > > of this message is not the intended recipient, or an employee
> > > > > or agent responsible for delivering this message to the
> > > > > intended recipient, you are hereby notified that any
reproduction,
> > > > > dissemination or distribution of this communication is
strictly
> > > > > prohibited. If you have received this communication in error,
> > > > > please notify us immediately by replying to the message and
> > > > > deleting it from your computer. Thank you. Tellabs
> > > > > ============================================================
> > > > >
> > > > >
---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
============================================================
The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any reproduction,
dissemination or distribution of this communication is strictly
prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and
deleting it from your computer. Thank you. Tellabs
============================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: AbstractHTTPSender not releasing connection

Posted by "Kang, Kamaljeet K." <Ka...@tellabs.com>.
I just tested the example code in HttpClient,
'MultiThreadedExample.java' (modified so that it runs forever). It
reuses the pool of connections. I do not see it creating new connection
all the time.

Should I enter a bug?

kamal

-----Original Message-----
From: Davanum Srinivas [mailto:davanum@gmail.com] 
Sent: Friday, May 04, 2007 11:26 AM
To: axis-user@ws.apache.org
Subject: Re: AbstractHTTPSender not releasing connection

Ok then try this tactic. Can you get hold of the OperationContext for
each invocation? Typically you can use
myServiceContext.getLastOperationContext() to get the last
OperationContext. You will have to start caching them though by
calling myServiceClient.setCachingOperationContext(true) or you can
create the OperationContext by calling
myServiceContext.createOperationContext as well. Either way after the
invocation is done you can call the following snippet to cleanup the
HttpMethod.

myOperationContext.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VAL
UE);
_messageContext.getTransportOut().getSender().cleanup(_messageContext);

thanks,
dims

On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> Dims,
>
> what do you mean by "calling the complete method"?. In this scenario
I'm
> using simple ServiceClient(s) sharing the same conf. context and
> attached to custom callbacks (I'm reusing the same ServiceClients for
> thousands of asynchronous requests).
> For my knowledge (see the link below) the cleanup (on the
ServiceClient)
> should be called only at the end which, as I said, is after receiving
> thousands of responses.
> Are you then suggesting me to share an OperationClient for all my
> requests and to free resources as soon as I receive the response?
>
> Thanks,
> Michele
>
>
http://www.nabble.com/-Axis2--ServiceClient-question-tf2496516.html#a907
8044
>
> On Fri, 2007-05-04 at 10:56 -0400, Davanum Srinivas wrote:
> > Michele,
> >
> > Are you calling the complete method in OperationClient? that calls
the
> > cleanup method in the TransportSender. I believe we are doing that
> > automatically in generated stubs as well where we generate the
> > following call.
> >
> >
_messageContext.getTransportOut().getSender().cleanup(_messageContext);
> >
> > that calls the releaseConnection on the HttpMethod.
> >
> > -- dims
> >
> > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > But that workaround works only on Windows :(
> > >
> > > Michele
> > >
> > > On Fri, 2007-05-04 at 10:18 -0400, Davanum Srinivas wrote:
> > > > Guess the only work around is the tuning parameters as mentioned
> > > > there...so it's a no-op fo us. There's nothing we can do..is
there?
> > > >
> > > > -- dims
> > > >
> > > > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > > > Dims,
> > > > >
> > > > > please see here
> > > > > https://issues.apache.org/jira/browse/AXIS2-2593
> > > > >
> > > > >
> > > > > Michele
> > > > >
> > > > > On Fri, 2007-05-04 at 09:59 -0400, Davanum Srinivas wrote:
> > > > > > Michele,
> > > > > >
> > > > > > Here's what is see in the http client code:
> > > > > >
http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/
src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManage
r.java
> > > > > >
> > > > > >    /** The default maximum number of connections allowed per
host */
> > > > > >     public static final int DEFAULT_MAX_HOST_CONNECTIONS =
2;   // Per
> > > > > > RFC 2616 sec 8.1.4
> > > > > >
> > > > > >     /** The default maximum number of connections allowed
overall */
> > > > > >     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS =
20;
> > > > > >
> > > > > > Could the new threads being created because the old ones are
still in
> > > > > > progress? can you bump up the default limits and try?
> > > > > >
> > > > > > -- dims
> > > > > >
> > > > > > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk>
wrote:
> > > > > > > Dims,
> > > > > > >
> > > > > > > even if the HttpClient is cached new connections are
created every 3/4
> > > > > > > requests.
> > > > > > >
> > > > > > > Michele
> > > > > > >
> > > > > > > On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > > > > > > > Kamaljeet,
> > > > > > > >
> > > > > > > > can you try the 2nd option here:
> > > > > > > > http://wso2.org/library/87
> > > > > > > >
> > > > > > > > -- dims
> > > > > > > >
> > > > > > > > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com>
wrote:
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > I turned the HttpClient log on and from the log it
looks like new
> > > > > > > > > connection is created for every request. I am sending
request every 1
> > > > > > > > > sec so connection shouldn't idle out. I think,
AbstractHTTPSender is not
> > > > > > > > > releasing the connection back to the pool so
> > > > > > > > > 'MultiThreadedHttpConnectionManager cleanup' thread is
trashing it after
> > > > > > > > > 1 use.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > >>>>>>>> Log
> > > > > > > > >
> > > > > > > > > 04-May 08:11:22,184 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a
connection,
> > > > > > > > > waiting...,
hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > > > **********ProbCause*****PROP_TEST
> > > > > > > > > 04-May 08:52:15,369 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [MultiThreadedHttpConnectionManager cleanup] -
Connection reclaimed by
> > > > > > > > > garbage collector,
> > > > > > > > >
hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > > > 04-May 08:52:15,369 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > > > > >
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > > > > 04-May 08:52:15,369 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > > > > >
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > > > > 04-May 08:52:15,369 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [MultiThreadedHttpConnectionManager cleanup] -
Notifying thread waiting
> > > > > > > > > on host pool,
hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > > > 04-May 08:52:15,369 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > > > > > > >
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > > > > 04-May 08:52:15,369 DEBUG
httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new
connection,
> > > > > > > > >
hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > > > 04-May 08:52:15,369 DEBUG
httpclient.HttpMethodDirector
> > > > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to
process request
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > >
> > > > > > > > > Kamal
> > > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Michele Mazzucco
[mailto:Michele.Mazzucco@ncl.ac.uk]
> > > > > > > > > Sent: Friday, May 04, 2007 4:22 AM
> > > > > > > > > To: axis-user@ws.apache.org
> > > > > > > > > Subject: Re: AbstractHTTPSender not releasing
connection
> > > > > > > > >
> > > > > > > > > Hi Kamal,
> > > > > > > > >
> > > > > > > > > HttpClient by default uses persistent (keep alive)
connections, however
> > > > > > > > > every few requests a new connection is created.
> > > > > > > > >
> > > > > > > > > Michele
> > > > > > > > >
> > > > > > > > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K.
wrote:
> > > > > > > > > > Hi,
> > > > > > > > > >
> > > > > > > > > > As per HTTPClient documentation if you are using
> > > > > > > > > > MultiThreadedhttpConnectionManager then for every
> > > > > > > > > > HttpClient.executeMethod there has to be
corresponding
> > > > > > > > > > 'releaseConnection' call. I do not see
AbstractHttpSender releasing
> > > > > > > > > > connection anywhere in the code. Is this the reason
why even after
> > > > > > > > > using
> > > > > > > > > > REUSE_HTTP_CLIENT, we see new HTTP connection
created for every
> > > > > > > > > > request/response?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Thanks
> > > > > > > > > >
> > > > > > > > > > Kamal
> > > > > > > > > >
============================================================
> > > > > > > > > > The information contained in this message may be
privileged
> > > > > > > > > > and confidential and protected from disclosure. If
the reader
> > > > > > > > > > of this message is not the intended recipient, or an
employee
> > > > > > > > > > or agent responsible for delivering this message to
the
> > > > > > > > > > intended recipient, you are hereby notified that any
reproduction,
> > > > > > > > > > dissemination or distribution of this communication
is strictly
> > > > > > > > > > prohibited. If you have received this communication
in error,
> > > > > > > > > > please notify us immediately by replying to the
message and
> > > > > > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > > > > >
============================================================
> > > > > > > > > >
> > > > > > > > > >
---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
axis-user-unsubscribe@ws.apache.org
> > > > > > > > > > For additional commands, e-mail:
axis-user-help@ws.apache.org
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
axis-user-unsubscribe@ws.apache.org
> > > > > > > > > For additional commands, e-mail:
axis-user-help@ws.apache.org
> > > > > > > > >
============================================================
> > > > > > > > > The information contained in this message may be
privileged
> > > > > > > > > and confidential and protected from disclosure. If the
reader
> > > > > > > > > of this message is not the intended recipient, or an
employee
> > > > > > > > > or agent responsible for delivering this message to
the
> > > > > > > > > intended recipient, you are hereby notified that any
reproduction,
> > > > > > > > > dissemination or distribution of this communication is
strictly
> > > > > > > > > prohibited. If you have received this communication in
error,
> > > > > > > > > please notify us immediately by replying to the
message and
> > > > > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > > > >
============================================================
> > > > > > > > >
> > > > > > > > >
---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
axis-user-unsubscribe@ws.apache.org
> > > > > > > > > For additional commands, e-mail:
axis-user-help@ws.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
axis-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
axis-user-help@ws.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
============================================================
The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any reproduction,
dissemination or distribution of this communication is strictly
prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and
deleting it from your computer. Thank you. Tellabs
============================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Davanum Srinivas <da...@gmail.com>.
Ok then try this tactic. Can you get hold of the OperationContext for
each invocation? Typically you can use
myServiceContext.getLastOperationContext() to get the last
OperationContext. You will have to start caching them though by
calling myServiceClient.setCachingOperationContext(true) or you can
create the OperationContext by calling
myServiceContext.createOperationContext as well. Either way after the
invocation is done you can call the following snippet to cleanup the
HttpMethod.

myOperationContext.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
_messageContext.getTransportOut().getSender().cleanup(_messageContext);

thanks,
dims

On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> Dims,
>
> what do you mean by "calling the complete method"?. In this scenario I'm
> using simple ServiceClient(s) sharing the same conf. context and
> attached to custom callbacks (I'm reusing the same ServiceClients for
> thousands of asynchronous requests).
> For my knowledge (see the link below) the cleanup (on the ServiceClient)
> should be called only at the end which, as I said, is after receiving
> thousands of responses.
> Are you then suggesting me to share an OperationClient for all my
> requests and to free resources as soon as I receive the response?
>
> Thanks,
> Michele
>
> http://www.nabble.com/-Axis2--ServiceClient-question-tf2496516.html#a9078044
>
> On Fri, 2007-05-04 at 10:56 -0400, Davanum Srinivas wrote:
> > Michele,
> >
> > Are you calling the complete method in OperationClient? that calls the
> > cleanup method in the TransportSender. I believe we are doing that
> > automatically in generated stubs as well where we generate the
> > following call.
> >
> > _messageContext.getTransportOut().getSender().cleanup(_messageContext);
> >
> > that calls the releaseConnection on the HttpMethod.
> >
> > -- dims
> >
> > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > But that workaround works only on Windows :(
> > >
> > > Michele
> > >
> > > On Fri, 2007-05-04 at 10:18 -0400, Davanum Srinivas wrote:
> > > > Guess the only work around is the tuning parameters as mentioned
> > > > there...so it's a no-op fo us. There's nothing we can do..is there?
> > > >
> > > > -- dims
> > > >
> > > > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > > > Dims,
> > > > >
> > > > > please see here
> > > > > https://issues.apache.org/jira/browse/AXIS2-2593
> > > > >
> > > > >
> > > > > Michele
> > > > >
> > > > > On Fri, 2007-05-04 at 09:59 -0400, Davanum Srinivas wrote:
> > > > > > Michele,
> > > > > >
> > > > > > Here's what is see in the http client code:
> > > > > > http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
> > > > > >
> > > > > >    /** The default maximum number of connections allowed per host */
> > > > > >     public static final int DEFAULT_MAX_HOST_CONNECTIONS = 2;   // Per
> > > > > > RFC 2616 sec 8.1.4
> > > > > >
> > > > > >     /** The default maximum number of connections allowed overall */
> > > > > >     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;
> > > > > >
> > > > > > Could the new threads being created because the old ones are still in
> > > > > > progress? can you bump up the default limits and try?
> > > > > >
> > > > > > -- dims
> > > > > >
> > > > > > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > > > > > Dims,
> > > > > > >
> > > > > > > even if the HttpClient is cached new connections are created every 3/4
> > > > > > > requests.
> > > > > > >
> > > > > > > Michele
> > > > > > >
> > > > > > > On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > > > > > > > Kamaljeet,
> > > > > > > >
> > > > > > > > can you try the 2nd option here:
> > > > > > > > http://wso2.org/library/87
> > > > > > > >
> > > > > > > > -- dims
> > > > > > > >
> > > > > > > > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > I turned the HttpClient log on and from the log it looks like new
> > > > > > > > > connection is created for every request. I am sending request every 1
> > > > > > > > > sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> > > > > > > > > releasing the connection back to the pool so
> > > > > > > > > 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> > > > > > > > > 1 use.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > >>>>>>>> Log
> > > > > > > > >
> > > > > > > > > 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > > > > > > > > waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > > > **********ProbCause*****PROP_TEST
> > > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> > > > > > > > > garbage collector,
> > > > > > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> > > > > > > > > on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > > > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > > > > > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > > > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > >
> > > > > > > > > Kamal
> > > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > > > > > > > > Sent: Friday, May 04, 2007 4:22 AM
> > > > > > > > > To: axis-user@ws.apache.org
> > > > > > > > > Subject: Re: AbstractHTTPSender not releasing connection
> > > > > > > > >
> > > > > > > > > Hi Kamal,
> > > > > > > > >
> > > > > > > > > HttpClient by default uses persistent (keep alive) connections, however
> > > > > > > > > every few requests a new connection is created.
> > > > > > > > >
> > > > > > > > > Michele
> > > > > > > > >
> > > > > > > > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > > > > > > > > Hi,
> > > > > > > > > >
> > > > > > > > > > As per HTTPClient documentation if you are using
> > > > > > > > > > MultiThreadedhttpConnectionManager then for every
> > > > > > > > > > HttpClient.executeMethod there has to be corresponding
> > > > > > > > > > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > > > > > > > > > connection anywhere in the code. Is this the reason why even after
> > > > > > > > > using
> > > > > > > > > > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > > > > > > > > > request/response?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Thanks
> > > > > > > > > >
> > > > > > > > > > Kamal
> > > > > > > > > > ============================================================
> > > > > > > > > > The information contained in this message may be privileged
> > > > > > > > > > and confidential and protected from disclosure. If the reader
> > > > > > > > > > of this message is not the intended recipient, or an employee
> > > > > > > > > > or agent responsible for delivering this message to the
> > > > > > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > > > > > dissemination or distribution of this communication is strictly
> > > > > > > > > > prohibited. If you have received this communication in error,
> > > > > > > > > > please notify us immediately by replying to the message and
> > > > > > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > > > > > ============================================================
> > > > > > > > > >
> > > > > > > > > > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > > > > ============================================================
> > > > > > > > > The information contained in this message may be privileged
> > > > > > > > > and confidential and protected from disclosure. If the reader
> > > > > > > > > of this message is not the intended recipient, or an employee
> > > > > > > > > or agent responsible for delivering this message to the
> > > > > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > > > > dissemination or distribution of this communication is strictly
> > > > > > > > > prohibited. If you have received this communication in error,
> > > > > > > > > please notify us immediately by replying to the message and
> > > > > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > > > > ============================================================
> > > > > > > > >
> > > > > > > > > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Dims,

what do you mean by "calling the complete method"?. In this scenario I'm
using simple ServiceClient(s) sharing the same conf. context and
attached to custom callbacks (I'm reusing the same ServiceClients for
thousands of asynchronous requests).
For my knowledge (see the link below) the cleanup (on the ServiceClient)
should be called only at the end which, as I said, is after receiving
thousands of responses.
Are you then suggesting me to share an OperationClient for all my
requests and to free resources as soon as I receive the response?

Thanks,
Michele

http://www.nabble.com/-Axis2--ServiceClient-question-tf2496516.html#a9078044

On Fri, 2007-05-04 at 10:56 -0400, Davanum Srinivas wrote:
> Michele,
> 
> Are you calling the complete method in OperationClient? that calls the
> cleanup method in the TransportSender. I believe we are doing that
> automatically in generated stubs as well where we generate the
> following call.
> 
> _messageContext.getTransportOut().getSender().cleanup(_messageContext);
> 
> that calls the releaseConnection on the HttpMethod.
> 
> -- dims
> 
> On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > But that workaround works only on Windows :(
> >
> > Michele
> >
> > On Fri, 2007-05-04 at 10:18 -0400, Davanum Srinivas wrote:
> > > Guess the only work around is the tuning parameters as mentioned
> > > there...so it's a no-op fo us. There's nothing we can do..is there?
> > >
> > > -- dims
> > >
> > > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > > Dims,
> > > >
> > > > please see here
> > > > https://issues.apache.org/jira/browse/AXIS2-2593
> > > >
> > > >
> > > > Michele
> > > >
> > > > On Fri, 2007-05-04 at 09:59 -0400, Davanum Srinivas wrote:
> > > > > Michele,
> > > > >
> > > > > Here's what is see in the http client code:
> > > > > http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
> > > > >
> > > > >    /** The default maximum number of connections allowed per host */
> > > > >     public static final int DEFAULT_MAX_HOST_CONNECTIONS = 2;   // Per
> > > > > RFC 2616 sec 8.1.4
> > > > >
> > > > >     /** The default maximum number of connections allowed overall */
> > > > >     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;
> > > > >
> > > > > Could the new threads being created because the old ones are still in
> > > > > progress? can you bump up the default limits and try?
> > > > >
> > > > > -- dims
> > > > >
> > > > > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > > > > Dims,
> > > > > >
> > > > > > even if the HttpClient is cached new connections are created every 3/4
> > > > > > requests.
> > > > > >
> > > > > > Michele
> > > > > >
> > > > > > On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > > > > > > Kamaljeet,
> > > > > > >
> > > > > > > can you try the 2nd option here:
> > > > > > > http://wso2.org/library/87
> > > > > > >
> > > > > > > -- dims
> > > > > > >
> > > > > > > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I turned the HttpClient log on and from the log it looks like new
> > > > > > > > connection is created for every request. I am sending request every 1
> > > > > > > > sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> > > > > > > > releasing the connection back to the pool so
> > > > > > > > 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> > > > > > > > 1 use.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > >>>>>>>> Log
> > > > > > > >
> > > > > > > > 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > > > > > > > waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > > **********ProbCause*****PROP_TEST
> > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> > > > > > > > garbage collector,
> > > > > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> > > > > > > > on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > > > > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > >
> > > > > > > > Kamal
> > > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > > > > > > > Sent: Friday, May 04, 2007 4:22 AM
> > > > > > > > To: axis-user@ws.apache.org
> > > > > > > > Subject: Re: AbstractHTTPSender not releasing connection
> > > > > > > >
> > > > > > > > Hi Kamal,
> > > > > > > >
> > > > > > > > HttpClient by default uses persistent (keep alive) connections, however
> > > > > > > > every few requests a new connection is created.
> > > > > > > >
> > > > > > > > Michele
> > > > > > > >
> > > > > > > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > As per HTTPClient documentation if you are using
> > > > > > > > > MultiThreadedhttpConnectionManager then for every
> > > > > > > > > HttpClient.executeMethod there has to be corresponding
> > > > > > > > > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > > > > > > > > connection anywhere in the code. Is this the reason why even after
> > > > > > > > using
> > > > > > > > > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > > > > > > > > request/response?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > >
> > > > > > > > > Kamal
> > > > > > > > > ============================================================
> > > > > > > > > The information contained in this message may be privileged
> > > > > > > > > and confidential and protected from disclosure. If the reader
> > > > > > > > > of this message is not the intended recipient, or an employee
> > > > > > > > > or agent responsible for delivering this message to the
> > > > > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > > > > dissemination or distribution of this communication is strictly
> > > > > > > > > prohibited. If you have received this communication in error,
> > > > > > > > > please notify us immediately by replying to the message and
> > > > > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > > > > ============================================================
> > > > > > > > >
> > > > > > > > > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > > > ============================================================
> > > > > > > > The information contained in this message may be privileged
> > > > > > > > and confidential and protected from disclosure. If the reader
> > > > > > > > of this message is not the intended recipient, or an employee
> > > > > > > > or agent responsible for delivering this message to the
> > > > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > > > dissemination or distribution of this communication is strictly
> > > > > > > > prohibited. If you have received this communication in error,
> > > > > > > > please notify us immediately by replying to the message and
> > > > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > > > ============================================================
> > > > > > > >
> > > > > > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Davanum Srinivas <da...@gmail.com>.
Michele,

Are you calling the complete method in OperationClient? that calls the
cleanup method in the TransportSender. I believe we are doing that
automatically in generated stubs as well where we generate the
following call.

_messageContext.getTransportOut().getSender().cleanup(_messageContext);

that calls the releaseConnection on the HttpMethod.

-- dims

On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> But that workaround works only on Windows :(
>
> Michele
>
> On Fri, 2007-05-04 at 10:18 -0400, Davanum Srinivas wrote:
> > Guess the only work around is the tuning parameters as mentioned
> > there...so it's a no-op fo us. There's nothing we can do..is there?
> >
> > -- dims
> >
> > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > Dims,
> > >
> > > please see here
> > > https://issues.apache.org/jira/browse/AXIS2-2593
> > >
> > >
> > > Michele
> > >
> > > On Fri, 2007-05-04 at 09:59 -0400, Davanum Srinivas wrote:
> > > > Michele,
> > > >
> > > > Here's what is see in the http client code:
> > > > http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
> > > >
> > > >    /** The default maximum number of connections allowed per host */
> > > >     public static final int DEFAULT_MAX_HOST_CONNECTIONS = 2;   // Per
> > > > RFC 2616 sec 8.1.4
> > > >
> > > >     /** The default maximum number of connections allowed overall */
> > > >     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;
> > > >
> > > > Could the new threads being created because the old ones are still in
> > > > progress? can you bump up the default limits and try?
> > > >
> > > > -- dims
> > > >
> > > > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > > > Dims,
> > > > >
> > > > > even if the HttpClient is cached new connections are created every 3/4
> > > > > requests.
> > > > >
> > > > > Michele
> > > > >
> > > > > On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > > > > > Kamaljeet,
> > > > > >
> > > > > > can you try the 2nd option here:
> > > > > > http://wso2.org/library/87
> > > > > >
> > > > > > -- dims
> > > > > >
> > > > > > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > I turned the HttpClient log on and from the log it looks like new
> > > > > > > connection is created for every request. I am sending request every 1
> > > > > > > sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> > > > > > > releasing the connection back to the pool so
> > > > > > > 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> > > > > > > 1 use.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > >>>>>>>> Log
> > > > > > >
> > > > > > > 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > > > > > > waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > **********ProbCause*****PROP_TEST
> > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> > > > > > > garbage collector,
> > > > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> > > > > > > on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > > > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Thanks
> > > > > > >
> > > > > > > Kamal
> > > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > > > > > > Sent: Friday, May 04, 2007 4:22 AM
> > > > > > > To: axis-user@ws.apache.org
> > > > > > > Subject: Re: AbstractHTTPSender not releasing connection
> > > > > > >
> > > > > > > Hi Kamal,
> > > > > > >
> > > > > > > HttpClient by default uses persistent (keep alive) connections, however
> > > > > > > every few requests a new connection is created.
> > > > > > >
> > > > > > > Michele
> > > > > > >
> > > > > > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > As per HTTPClient documentation if you are using
> > > > > > > > MultiThreadedhttpConnectionManager then for every
> > > > > > > > HttpClient.executeMethod there has to be corresponding
> > > > > > > > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > > > > > > > connection anywhere in the code. Is this the reason why even after
> > > > > > > using
> > > > > > > > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > > > > > > > request/response?
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > >
> > > > > > > > Kamal
> > > > > > > > ============================================================
> > > > > > > > The information contained in this message may be privileged
> > > > > > > > and confidential and protected from disclosure. If the reader
> > > > > > > > of this message is not the intended recipient, or an employee
> > > > > > > > or agent responsible for delivering this message to the
> > > > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > > > dissemination or distribution of this communication is strictly
> > > > > > > > prohibited. If you have received this communication in error,
> > > > > > > > please notify us immediately by replying to the message and
> > > > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > > > ============================================================
> > > > > > > >
> > > > > > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > > ============================================================
> > > > > > > The information contained in this message may be privileged
> > > > > > > and confidential and protected from disclosure. If the reader
> > > > > > > of this message is not the intended recipient, or an employee
> > > > > > > or agent responsible for delivering this message to the
> > > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > > dissemination or distribution of this communication is strictly
> > > > > > > prohibited. If you have received this communication in error,
> > > > > > > please notify us immediately by replying to the message and
> > > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > > ============================================================
> > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
But that workaround works only on Windows :(

Michele

On Fri, 2007-05-04 at 10:18 -0400, Davanum Srinivas wrote:
> Guess the only work around is the tuning parameters as mentioned
> there...so it's a no-op fo us. There's nothing we can do..is there?
> 
> -- dims
> 
> On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > Dims,
> >
> > please see here
> > https://issues.apache.org/jira/browse/AXIS2-2593
> >
> >
> > Michele
> >
> > On Fri, 2007-05-04 at 09:59 -0400, Davanum Srinivas wrote:
> > > Michele,
> > >
> > > Here's what is see in the http client code:
> > > http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
> > >
> > >    /** The default maximum number of connections allowed per host */
> > >     public static final int DEFAULT_MAX_HOST_CONNECTIONS = 2;   // Per
> > > RFC 2616 sec 8.1.4
> > >
> > >     /** The default maximum number of connections allowed overall */
> > >     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;
> > >
> > > Could the new threads being created because the old ones are still in
> > > progress? can you bump up the default limits and try?
> > >
> > > -- dims
> > >
> > > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > > Dims,
> > > >
> > > > even if the HttpClient is cached new connections are created every 3/4
> > > > requests.
> > > >
> > > > Michele
> > > >
> > > > On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > > > > Kamaljeet,
> > > > >
> > > > > can you try the 2nd option here:
> > > > > http://wso2.org/library/87
> > > > >
> > > > > -- dims
> > > > >
> > > > > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I turned the HttpClient log on and from the log it looks like new
> > > > > > connection is created for every request. I am sending request every 1
> > > > > > sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> > > > > > releasing the connection back to the pool so
> > > > > > 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> > > > > > 1 use.
> > > > > >
> > > > > >
> > > > > >
> > > > > > >>>>>>>> Log
> > > > > >
> > > > > > 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > > > > > waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > **********ProbCause*****PROP_TEST
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> > > > > > garbage collector,
> > > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> > > > > > on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > Kamal
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > > > > > Sent: Friday, May 04, 2007 4:22 AM
> > > > > > To: axis-user@ws.apache.org
> > > > > > Subject: Re: AbstractHTTPSender not releasing connection
> > > > > >
> > > > > > Hi Kamal,
> > > > > >
> > > > > > HttpClient by default uses persistent (keep alive) connections, however
> > > > > > every few requests a new connection is created.
> > > > > >
> > > > > > Michele
> > > > > >
> > > > > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > As per HTTPClient documentation if you are using
> > > > > > > MultiThreadedhttpConnectionManager then for every
> > > > > > > HttpClient.executeMethod there has to be corresponding
> > > > > > > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > > > > > > connection anywhere in the code. Is this the reason why even after
> > > > > > using
> > > > > > > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > > > > > > request/response?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Thanks
> > > > > > >
> > > > > > > Kamal
> > > > > > > ============================================================
> > > > > > > The information contained in this message may be privileged
> > > > > > > and confidential and protected from disclosure. If the reader
> > > > > > > of this message is not the intended recipient, or an employee
> > > > > > > or agent responsible for delivering this message to the
> > > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > > dissemination or distribution of this communication is strictly
> > > > > > > prohibited. If you have received this communication in error,
> > > > > > > please notify us immediately by replying to the message and
> > > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > > ============================================================
> > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > >
> > > > > >
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > ============================================================
> > > > > > The information contained in this message may be privileged
> > > > > > and confidential and protected from disclosure. If the reader
> > > > > > of this message is not the intended recipient, or an employee
> > > > > > or agent responsible for delivering this message to the
> > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > dissemination or distribution of this communication is strictly
> > > > > > prohibited. If you have received this communication in error,
> > > > > > please notify us immediately by replying to the message and
> > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > ============================================================
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Davanum Srinivas <da...@gmail.com>.
Guess the only work around is the tuning parameters as mentioned
there...so it's a no-op fo us. There's nothing we can do..is there?

-- dims

On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> Dims,
>
> please see here
> https://issues.apache.org/jira/browse/AXIS2-2593
>
>
> Michele
>
> On Fri, 2007-05-04 at 09:59 -0400, Davanum Srinivas wrote:
> > Michele,
> >
> > Here's what is see in the http client code:
> > http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
> >
> >    /** The default maximum number of connections allowed per host */
> >     public static final int DEFAULT_MAX_HOST_CONNECTIONS = 2;   // Per
> > RFC 2616 sec 8.1.4
> >
> >     /** The default maximum number of connections allowed overall */
> >     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;
> >
> > Could the new threads being created because the old ones are still in
> > progress? can you bump up the default limits and try?
> >
> > -- dims
> >
> > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > Dims,
> > >
> > > even if the HttpClient is cached new connections are created every 3/4
> > > requests.
> > >
> > > Michele
> > >
> > > On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > > > Kamaljeet,
> > > >
> > > > can you try the 2nd option here:
> > > > http://wso2.org/library/87
> > > >
> > > > -- dims
> > > >
> > > > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > > > > Hi,
> > > > >
> > > > > I turned the HttpClient log on and from the log it looks like new
> > > > > connection is created for every request. I am sending request every 1
> > > > > sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> > > > > releasing the connection back to the pool so
> > > > > 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> > > > > 1 use.
> > > > >
> > > > >
> > > > >
> > > > > >>>>>>>> Log
> > > > >
> > > > > 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > > > > waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > **********ProbCause*****PROP_TEST
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> > > > > garbage collector,
> > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> > > > > on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
> > > > >
> > > > >
> > > > >
> > > > > Thanks
> > > > >
> > > > > Kamal
> > > > >
> > > > > -----Original Message-----
> > > > > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > > > > Sent: Friday, May 04, 2007 4:22 AM
> > > > > To: axis-user@ws.apache.org
> > > > > Subject: Re: AbstractHTTPSender not releasing connection
> > > > >
> > > > > Hi Kamal,
> > > > >
> > > > > HttpClient by default uses persistent (keep alive) connections, however
> > > > > every few requests a new connection is created.
> > > > >
> > > > > Michele
> > > > >
> > > > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > > > > Hi,
> > > > > >
> > > > > > As per HTTPClient documentation if you are using
> > > > > > MultiThreadedhttpConnectionManager then for every
> > > > > > HttpClient.executeMethod there has to be corresponding
> > > > > > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > > > > > connection anywhere in the code. Is this the reason why even after
> > > > > using
> > > > > > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > > > > > request/response?
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > Kamal
> > > > > > ============================================================
> > > > > > The information contained in this message may be privileged
> > > > > > and confidential and protected from disclosure. If the reader
> > > > > > of this message is not the intended recipient, or an employee
> > > > > > or agent responsible for delivering this message to the
> > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > dissemination or distribution of this communication is strictly
> > > > > > prohibited. If you have received this communication in error,
> > > > > > please notify us immediately by replying to the message and
> > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > ============================================================
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > >
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > ============================================================
> > > > > The information contained in this message may be privileged
> > > > > and confidential and protected from disclosure. If the reader
> > > > > of this message is not the intended recipient, or an employee
> > > > > or agent responsible for delivering this message to the
> > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > dissemination or distribution of this communication is strictly
> > > > > prohibited. If you have received this communication in error,
> > > > > please notify us immediately by replying to the message and
> > > > > deleting it from your computer. Thank you. Tellabs
> > > > > ============================================================
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Maybe these could be of interest (on linux/unix systems I see a lot of
connections in CLOSE_WAIT state, and I'm using only a cached HttpClient)

http://www.fedora.info/bugzilla/show_bug.cgi?id=138


http://www.mail-archive.com/commons-httpclient-dev@jakarta.apache.org/msg07554.html
(I think this is why if System.gc() is "periodically" called some
connections are closed)


Michele



On Fri, 2007-05-04 at 15:11 +0100, Michele Mazzucco wrote:
> Dims,
> 
> please see here
> https://issues.apache.org/jira/browse/AXIS2-2593
> 
> 
> Michele
> 
> On Fri, 2007-05-04 at 09:59 -0400, Davanum Srinivas wrote:
> > Michele,
> > 
> > Here's what is see in the http client code:
> > http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
> > 
> >    /** The default maximum number of connections allowed per host */
> >     public static final int DEFAULT_MAX_HOST_CONNECTIONS = 2;   // Per
> > RFC 2616 sec 8.1.4
> > 
> >     /** The default maximum number of connections allowed overall */
> >     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;
> > 
> > Could the new threads being created because the old ones are still in
> > progress? can you bump up the default limits and try?
> > 
> > -- dims
> > 
> > On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > Dims,
> > >
> > > even if the HttpClient is cached new connections are created every 3/4
> > > requests.
> > >
> > > Michele
> > >
> > > On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > > > Kamaljeet,
> > > >
> > > > can you try the 2nd option here:
> > > > http://wso2.org/library/87
> > > >
> > > > -- dims
> > > >
> > > > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > > > > Hi,
> > > > >
> > > > > I turned the HttpClient log on and from the log it looks like new
> > > > > connection is created for every request. I am sending request every 1
> > > > > sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> > > > > releasing the connection back to the pool so
> > > > > 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> > > > > 1 use.
> > > > >
> > > > >
> > > > >
> > > > > >>>>>>>> Log
> > > > >
> > > > > 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > > > > waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > **********ProbCause*****PROP_TEST
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> > > > > garbage collector,
> > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> > > > > on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
> > > > >
> > > > >
> > > > >
> > > > > Thanks
> > > > >
> > > > > Kamal
> > > > >
> > > > > -----Original Message-----
> > > > > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > > > > Sent: Friday, May 04, 2007 4:22 AM
> > > > > To: axis-user@ws.apache.org
> > > > > Subject: Re: AbstractHTTPSender not releasing connection
> > > > >
> > > > > Hi Kamal,
> > > > >
> > > > > HttpClient by default uses persistent (keep alive) connections, however
> > > > > every few requests a new connection is created.
> > > > >
> > > > > Michele
> > > > >
> > > > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > > > > Hi,
> > > > > >
> > > > > > As per HTTPClient documentation if you are using
> > > > > > MultiThreadedhttpConnectionManager then for every
> > > > > > HttpClient.executeMethod there has to be corresponding
> > > > > > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > > > > > connection anywhere in the code. Is this the reason why even after
> > > > > using
> > > > > > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > > > > > request/response?
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > Kamal
> > > > > > ============================================================
> > > > > > The information contained in this message may be privileged
> > > > > > and confidential and protected from disclosure. If the reader
> > > > > > of this message is not the intended recipient, or an employee
> > > > > > or agent responsible for delivering this message to the
> > > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > > dissemination or distribution of this communication is strictly
> > > > > > prohibited. If you have received this communication in error,
> > > > > > please notify us immediately by replying to the message and
> > > > > > deleting it from your computer. Thank you. Tellabs
> > > > > > ============================================================
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > >
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > ============================================================
> > > > > The information contained in this message may be privileged
> > > > > and confidential and protected from disclosure. If the reader
> > > > > of this message is not the intended recipient, or an employee
> > > > > or agent responsible for delivering this message to the
> > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > dissemination or distribution of this communication is strictly
> > > > > prohibited. If you have received this communication in error,
> > > > > please notify us immediately by replying to the message and
> > > > > deleting it from your computer. Thank you. Tellabs
> > > > > ============================================================
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: AbstractHTTPSender not releasing connection

Posted by "Cox, Brian (GE Infra, Energy)" <br...@ge.com>.
I believe this JIRA is also related:

http://issues.apache.org/jira/browse/AXIS2-935



 -----Original Message-----
From: 	Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk] 
Sent:	Friday, May 04, 2007 10:12 AM
To:	axis2
Subject:	Re: AbstractHTTPSender not releasing connection

Dims,

please see here
https://issues.apache.org/jira/browse/AXIS2-2593


Michele

On Fri, 2007-05-04 at 09:59 -0400, Davanum Srinivas wrote:
> Michele,
> 
> Here's what is see in the http client code:
> http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
> 
>    /** The default maximum number of connections allowed per host */
>     public static final int DEFAULT_MAX_HOST_CONNECTIONS = 2;   // Per
> RFC 2616 sec 8.1.4
> 
>     /** The default maximum number of connections allowed overall */
>     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;
> 
> Could the new threads being created because the old ones are still in
> progress? can you bump up the default limits and try?
> 
> -- dims
> 
> On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > Dims,
> >
> > even if the HttpClient is cached new connections are created every 3/4
> > requests.
> >
> > Michele
> >
> > On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > > Kamaljeet,
> > >
> > > can you try the 2nd option here:
> > > http://wso2.org/library/87
> > >
> > > -- dims
> > >
> > > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > > > Hi,
> > > >
> > > > I turned the HttpClient log on and from the log it looks like new
> > > > connection is created for every request. I am sending request every 1
> > > > sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> > > > releasing the connection back to the pool so
> > > > 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> > > > 1 use.
> > > >
> > > >
> > > >
> > > > >>>>>>>> Log
> > > >
> > > > 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > > > waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > **********ProbCause*****PROP_TEST
> > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> > > > garbage collector,
> > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> > > > on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
> > > >
> > > >
> > > >
> > > > Thanks
> > > >
> > > > Kamal
> > > >
> > > > -----Original Message-----
> > > > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > > > Sent: Friday, May 04, 2007 4:22 AM
> > > > To: axis-user@ws.apache.org
> > > > Subject: Re: AbstractHTTPSender not releasing connection
> > > >
> > > > Hi Kamal,
> > > >
> > > > HttpClient by default uses persistent (keep alive) connections, however
> > > > every few requests a new connection is created.
> > > >
> > > > Michele
> > > >
> > > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > > > Hi,
> > > > >
> > > > > As per HTTPClient documentation if you are using
> > > > > MultiThreadedhttpConnectionManager then for every
> > > > > HttpClient.executeMethod there has to be corresponding
> > > > > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > > > > connection anywhere in the code. Is this the reason why even after
> > > > using
> > > > > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > > > > request/response?
> > > > >
> > > > >
> > > > >
> > > > > Thanks
> > > > >
> > > > > Kamal
> > > > > ============================================================
> > > > > The information contained in this message may be privileged
> > > > > and confidential and protected from disclosure. If the reader
> > > > > of this message is not the intended recipient, or an employee
> > > > > or agent responsible for delivering this message to the
> > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > dissemination or distribution of this communication is strictly
> > > > > prohibited. If you have received this communication in error,
> > > > > please notify us immediately by replying to the message and
> > > > > deleting it from your computer. Thank you. Tellabs
> > > > > ============================================================
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > ============================================================
> > > > The information contained in this message may be privileged
> > > > and confidential and protected from disclosure. If the reader
> > > > of this message is not the intended recipient, or an employee
> > > > or agent responsible for delivering this message to the
> > > > intended recipient, you are hereby notified that any reproduction,
> > > > dissemination or distribution of this communication is strictly
> > > > prohibited. If you have received this communication in error,
> > > > please notify us immediately by replying to the message and
> > > > deleting it from your computer. Thank you. Tellabs
> > > > ============================================================
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Dims,

please see here
https://issues.apache.org/jira/browse/AXIS2-2593


Michele

On Fri, 2007-05-04 at 09:59 -0400, Davanum Srinivas wrote:
> Michele,
> 
> Here's what is see in the http client code:
> http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
> 
>    /** The default maximum number of connections allowed per host */
>     public static final int DEFAULT_MAX_HOST_CONNECTIONS = 2;   // Per
> RFC 2616 sec 8.1.4
> 
>     /** The default maximum number of connections allowed overall */
>     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;
> 
> Could the new threads being created because the old ones are still in
> progress? can you bump up the default limits and try?
> 
> -- dims
> 
> On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > Dims,
> >
> > even if the HttpClient is cached new connections are created every 3/4
> > requests.
> >
> > Michele
> >
> > On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > > Kamaljeet,
> > >
> > > can you try the 2nd option here:
> > > http://wso2.org/library/87
> > >
> > > -- dims
> > >
> > > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > > > Hi,
> > > >
> > > > I turned the HttpClient log on and from the log it looks like new
> > > > connection is created for every request. I am sending request every 1
> > > > sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> > > > releasing the connection back to the pool so
> > > > 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> > > > 1 use.
> > > >
> > > >
> > > >
> > > > >>>>>>>> Log
> > > >
> > > > 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > > > waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > **********ProbCause*****PROP_TEST
> > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> > > > garbage collector,
> > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> > > > on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
> > > >
> > > >
> > > >
> > > > Thanks
> > > >
> > > > Kamal
> > > >
> > > > -----Original Message-----
> > > > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > > > Sent: Friday, May 04, 2007 4:22 AM
> > > > To: axis-user@ws.apache.org
> > > > Subject: Re: AbstractHTTPSender not releasing connection
> > > >
> > > > Hi Kamal,
> > > >
> > > > HttpClient by default uses persistent (keep alive) connections, however
> > > > every few requests a new connection is created.
> > > >
> > > > Michele
> > > >
> > > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > > > Hi,
> > > > >
> > > > > As per HTTPClient documentation if you are using
> > > > > MultiThreadedhttpConnectionManager then for every
> > > > > HttpClient.executeMethod there has to be corresponding
> > > > > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > > > > connection anywhere in the code. Is this the reason why even after
> > > > using
> > > > > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > > > > request/response?
> > > > >
> > > > >
> > > > >
> > > > > Thanks
> > > > >
> > > > > Kamal
> > > > > ============================================================
> > > > > The information contained in this message may be privileged
> > > > > and confidential and protected from disclosure. If the reader
> > > > > of this message is not the intended recipient, or an employee
> > > > > or agent responsible for delivering this message to the
> > > > > intended recipient, you are hereby notified that any reproduction,
> > > > > dissemination or distribution of this communication is strictly
> > > > > prohibited. If you have received this communication in error,
> > > > > please notify us immediately by replying to the message and
> > > > > deleting it from your computer. Thank you. Tellabs
> > > > > ============================================================
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > ============================================================
> > > > The information contained in this message may be privileged
> > > > and confidential and protected from disclosure. If the reader
> > > > of this message is not the intended recipient, or an employee
> > > > or agent responsible for delivering this message to the
> > > > intended recipient, you are hereby notified that any reproduction,
> > > > dissemination or distribution of this communication is strictly
> > > > prohibited. If you have received this communication in error,
> > > > please notify us immediately by replying to the message and
> > > > deleting it from your computer. Thank you. Tellabs
> > > > ============================================================
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Davanum Srinivas <da...@gmail.com>.
Michele,

Here's what is see in the http client code:
http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java

   /** The default maximum number of connections allowed per host */
    public static final int DEFAULT_MAX_HOST_CONNECTIONS = 2;   // Per
RFC 2616 sec 8.1.4

    /** The default maximum number of connections allowed overall */
    public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;

Could the new threads being created because the old ones are still in
progress? can you bump up the default limits and try?

-- dims

On 5/4/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> Dims,
>
> even if the HttpClient is cached new connections are created every 3/4
> requests.
>
> Michele
>
> On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> > Kamaljeet,
> >
> > can you try the 2nd option here:
> > http://wso2.org/library/87
> >
> > -- dims
> >
> > On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > > Hi,
> > >
> > > I turned the HttpClient log on and from the log it looks like new
> > > connection is created for every request. I am sending request every 1
> > > sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> > > releasing the connection back to the pool so
> > > 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> > > 1 use.
> > >
> > >
> > >
> > > >>>>>>>> Log
> > >
> > > 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > > waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> > > **********ProbCause*****PROP_TEST
> > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> > > garbage collector,
> > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > [MultiThreadedHttpConnectionManager cleanup] - enter
> > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> > > on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > > hostConfig=HostConfiguration[host=http://localhost:8081]
> > > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
> > >
> > >
> > >
> > > Thanks
> > >
> > > Kamal
> > >
> > > -----Original Message-----
> > > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > > Sent: Friday, May 04, 2007 4:22 AM
> > > To: axis-user@ws.apache.org
> > > Subject: Re: AbstractHTTPSender not releasing connection
> > >
> > > Hi Kamal,
> > >
> > > HttpClient by default uses persistent (keep alive) connections, however
> > > every few requests a new connection is created.
> > >
> > > Michele
> > >
> > > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > > Hi,
> > > >
> > > > As per HTTPClient documentation if you are using
> > > > MultiThreadedhttpConnectionManager then for every
> > > > HttpClient.executeMethod there has to be corresponding
> > > > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > > > connection anywhere in the code. Is this the reason why even after
> > > using
> > > > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > > > request/response?
> > > >
> > > >
> > > >
> > > > Thanks
> > > >
> > > > Kamal
> > > > ============================================================
> > > > The information contained in this message may be privileged
> > > > and confidential and protected from disclosure. If the reader
> > > > of this message is not the intended recipient, or an employee
> > > > or agent responsible for delivering this message to the
> > > > intended recipient, you are hereby notified that any reproduction,
> > > > dissemination or distribution of this communication is strictly
> > > > prohibited. If you have received this communication in error,
> > > > please notify us immediately by replying to the message and
> > > > deleting it from your computer. Thank you. Tellabs
> > > > ============================================================
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > ============================================================
> > > The information contained in this message may be privileged
> > > and confidential and protected from disclosure. If the reader
> > > of this message is not the intended recipient, or an employee
> > > or agent responsible for delivering this message to the
> > > intended recipient, you are hereby notified that any reproduction,
> > > dissemination or distribution of this communication is strictly
> > > prohibited. If you have received this communication in error,
> > > please notify us immediately by replying to the message and
> > > deleting it from your computer. Thank you. Tellabs
> > > ============================================================
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Dims,

even if the HttpClient is cached new connections are created every 3/4
requests.

Michele

On Fri, 2007-05-04 at 09:44 -0400, Davanum Srinivas wrote:
> Kamaljeet,
> 
> can you try the 2nd option here:
> http://wso2.org/library/87
> 
> -- dims
> 
> On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> > Hi,
> >
> > I turned the HttpClient log on and from the log it looks like new
> > connection is created for every request. I am sending request every 1
> > sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> > releasing the connection back to the pool so
> > 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> > 1 use.
> >
> >
> >
> > >>>>>>>> Log
> >
> > 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> > waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> > **********ProbCause*****PROP_TEST
> > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> > garbage collector,
> > hostConfig=HostConfiguration[host=http://localhost:8081]
> > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > [MultiThreadedHttpConnectionManager cleanup] - enter
> > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > [MultiThreadedHttpConnectionManager cleanup] - enter
> > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> > on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> > HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> > hostConfig=HostConfiguration[host=http://localhost:8081]
> > 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> > [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
> >
> >
> >
> > Thanks
> >
> > Kamal
> >
> > -----Original Message-----
> > From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> > Sent: Friday, May 04, 2007 4:22 AM
> > To: axis-user@ws.apache.org
> > Subject: Re: AbstractHTTPSender not releasing connection
> >
> > Hi Kamal,
> >
> > HttpClient by default uses persistent (keep alive) connections, however
> > every few requests a new connection is created.
> >
> > Michele
> >
> > On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > > Hi,
> > >
> > > As per HTTPClient documentation if you are using
> > > MultiThreadedhttpConnectionManager then for every
> > > HttpClient.executeMethod there has to be corresponding
> > > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > > connection anywhere in the code. Is this the reason why even after
> > using
> > > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > > request/response?
> > >
> > >
> > >
> > > Thanks
> > >
> > > Kamal
> > > ============================================================
> > > The information contained in this message may be privileged
> > > and confidential and protected from disclosure. If the reader
> > > of this message is not the intended recipient, or an employee
> > > or agent responsible for delivering this message to the
> > > intended recipient, you are hereby notified that any reproduction,
> > > dissemination or distribution of this communication is strictly
> > > prohibited. If you have received this communication in error,
> > > please notify us immediately by replying to the message and
> > > deleting it from your computer. Thank you. Tellabs
> > > ============================================================
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> > ============================================================
> > The information contained in this message may be privileged
> > and confidential and protected from disclosure. If the reader
> > of this message is not the intended recipient, or an employee
> > or agent responsible for delivering this message to the
> > intended recipient, you are hereby notified that any reproduction,
> > dissemination or distribution of this communication is strictly
> > prohibited. If you have received this communication in error,
> > please notify us immediately by replying to the message and
> > deleting it from your computer. Thank you. Tellabs
> > ============================================================
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Davanum Srinivas <da...@gmail.com>.
Kamaljeet,

can you try the 2nd option here:
http://wso2.org/library/87

-- dims

On 5/4/07, Kang, Kamaljeet K. <Ka...@tellabs.com> wrote:
> Hi,
>
> I turned the HttpClient log on and from the log it looks like new
> connection is created for every request. I am sending request every 1
> sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
> releasing the connection back to the pool so
> 'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
> 1 use.
>
>
>
> >>>>>>>> Log
>
> 04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
> [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
> waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
> **********ProbCause*****PROP_TEST
> 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> [MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
> garbage collector,
> hostConfig=HostConfiguration[host=http://localhost:8081]
> 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> [MultiThreadedHttpConnectionManager cleanup] - enter
> HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> [MultiThreadedHttpConnectionManager cleanup] - enter
> HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> [MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
> on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
> 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
> HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> 04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
> [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
> hostConfig=HostConfiguration[host=http://localhost:8081]
> 04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
> [PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request
>
>
>
> Thanks
>
> Kamal
>
> -----Original Message-----
> From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
> Sent: Friday, May 04, 2007 4:22 AM
> To: axis-user@ws.apache.org
> Subject: Re: AbstractHTTPSender not releasing connection
>
> Hi Kamal,
>
> HttpClient by default uses persistent (keep alive) connections, however
> every few requests a new connection is created.
>
> Michele
>
> On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> > Hi,
> >
> > As per HTTPClient documentation if you are using
> > MultiThreadedhttpConnectionManager then for every
> > HttpClient.executeMethod there has to be corresponding
> > 'releaseConnection' call. I do not see AbstractHttpSender releasing
> > connection anywhere in the code. Is this the reason why even after
> using
> > REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> > request/response?
> >
> >
> >
> > Thanks
> >
> > Kamal
> > ============================================================
> > The information contained in this message may be privileged
> > and confidential and protected from disclosure. If the reader
> > of this message is not the intended recipient, or an employee
> > or agent responsible for delivering this message to the
> > intended recipient, you are hereby notified that any reproduction,
> > dissemination or distribution of this communication is strictly
> > prohibited. If you have received this communication in error,
> > please notify us immediately by replying to the message and
> > deleting it from your computer. Thank you. Tellabs
> > ============================================================
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> ============================================================
> The information contained in this message may be privileged
> and confidential and protected from disclosure. If the reader
> of this message is not the intended recipient, or an employee
> or agent responsible for delivering this message to the
> intended recipient, you are hereby notified that any reproduction,
> dissemination or distribution of this communication is strictly
> prohibited. If you have received this communication in error,
> please notify us immediately by replying to the message and
> deleting it from your computer. Thank you. Tellabs
> ============================================================
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: AbstractHTTPSender not releasing connection

Posted by "Kang, Kamaljeet K." <Ka...@tellabs.com>.
Hi,

I turned the HttpClient log on and from the log it looks like new
connection is created for every request. I am sending request every 1
sec so connection shouldn't idle out. I think, AbstractHTTPSender is not
releasing the connection back to the pool so
'MultiThreadedHttpConnectionManager cleanup' thread is trashing it after
1 use. 



>>>>>>>> Log

04-May 08:11:22,184 DEBUG httpclient.MultiThreadedHttpConnectionManager
[PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Unable to get a connection,
waiting..., hostConfig=HostConfiguration[host=http://localhost:8081]
**********ProbCause*****PROP_TEST
04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
[MultiThreadedHttpConnectionManager cleanup] - Connection reclaimed by
garbage collector,
hostConfig=HostConfiguration[host=http://localhost:8081]
04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
[MultiThreadedHttpConnectionManager cleanup] - enter
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
[MultiThreadedHttpConnectionManager cleanup] - enter
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
[MultiThreadedHttpConnectionManager cleanup] - Notifying thread waiting
on host pool, hostConfig=HostConfiguration[host=http://localhost:8081]
04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
[PRIMARY_SUBSCRIBER_FAULT_TOPIC] - enter
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
04-May 08:52:15,369 DEBUG httpclient.MultiThreadedHttpConnectionManager
[PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Allocating new connection,
hostConfig=HostConfiguration[host=http://localhost:8081]
04-May 08:52:15,369 DEBUG httpclient.HttpMethodDirector
[PRIMARY_SUBSCRIBER_FAULT_TOPIC] - Attempt number 1 to process request



Thanks

Kamal

-----Original Message-----
From: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk] 
Sent: Friday, May 04, 2007 4:22 AM
To: axis-user@ws.apache.org
Subject: Re: AbstractHTTPSender not releasing connection

Hi Kamal,

HttpClient by default uses persistent (keep alive) connections, however
every few requests a new connection is created.

Michele

On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> Hi,
> 
> As per HTTPClient documentation if you are using
> MultiThreadedhttpConnectionManager then for every
> HttpClient.executeMethod there has to be corresponding
> 'releaseConnection' call. I do not see AbstractHttpSender releasing
> connection anywhere in the code. Is this the reason why even after
using
> REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> request/response?
> 
> 
> 
> Thanks
> 
> Kamal
> ============================================================
> The information contained in this message may be privileged
> and confidential and protected from disclosure. If the reader
> of this message is not the intended recipient, or an employee
> or agent responsible for delivering this message to the
> intended recipient, you are hereby notified that any reproduction,
> dissemination or distribution of this communication is strictly
> prohibited. If you have received this communication in error,
> please notify us immediately by replying to the message and
> deleting it from your computer. Thank you. Tellabs
> ============================================================
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
============================================================
The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any reproduction,
dissemination or distribution of this communication is strictly
prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and
deleting it from your computer. Thank you. Tellabs
============================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AbstractHTTPSender not releasing connection

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Hi Kamal,

HttpClient by default uses persistent (keep alive) connections, however
every few requests a new connection is created.

Michele

On Thu, 2007-05-03 at 16:15 -0400, Kang, Kamaljeet K. wrote:
> Hi,
> 
> As per HTTPClient documentation if you are using
> MultiThreadedhttpConnectionManager then for every
> HttpClient.executeMethod there has to be corresponding
> 'releaseConnection' call. I do not see AbstractHttpSender releasing
> connection anywhere in the code. Is this the reason why even after using
> REUSE_HTTP_CLIENT, we see new HTTP connection created for every
> request/response?
> 
> 
> 
> Thanks
> 
> Kamal
> ============================================================
> The information contained in this message may be privileged
> and confidential and protected from disclosure. If the reader
> of this message is not the intended recipient, or an employee
> or agent responsible for delivering this message to the
> intended recipient, you are hereby notified that any reproduction,
> dissemination or distribution of this communication is strictly
> prohibited. If you have received this communication in error,
> please notify us immediately by replying to the message and
> deleting it from your computer. Thank you. Tellabs
> ============================================================
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org