hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: About releaseconnection method of version 3.1
Date Mon, 26 May 2008 17:43:56 GMT
On Mon, 2008-05-26 at 12:52 +0530, Laxmilal Menaria wrote:
> I have tried closeIdleconnection after releaseconnection but all goes
> in  "TIME_WAIT" state.
> 
> i.e httpNetMethod.releaseConnection();
>      connectionManager.closeIdleConnections(1);
> 

Please see this document

http://wiki.apache.org/HttpComponents/FrequentlyAskedConnectionManagementQuestions

Oleg

> 
> On Fri, May 23, 2008 at 2:55 PM, Oleg Kalnichevski <olegk@apache.org> wrote:
> > On Fri, 2008-05-23 at 14:30 +0530, Laxmilal Menaria wrote:
> >> Hello,
> >>
> >> We are using httpclient 3.1 library in our application and sending
> >> multiple request using Multiple threads. Releasing connection when the
> >> thread completes using httpmethod.releaseconnection() method.
> >>
> >> But we encountered that the releaseconnection() method doesn't release
> >> the connection.
> >
> > Laxmilal,
> >
> > #releaseConnection() method is intended to return the connection back
> > to the connection manager. The connection manager per default will keep
> > persistent connections alive, which implies leaving the socket in the
> > established state.
> >
> >>  All the connection are in Established state. So now we
> >> are tried httpmethod.abort() in place of
> >> httpmethod.releaseconnection(), We need your comments on it.
> >>
> >
> > Rather call #closeIdleConnections(0) method of the connection manager to
> > close persistent if you do not want them. #abort method is intended to
> > force-terminate connections. You should use it sparingly.
> >
> > Oleg
> >
> >> Thanks,
> >> Laxmilal
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> >> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > For additional commands, e-mail: httpclient-users-help@hc.apache.org
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message