On Thu, 2008-07-17 at 17:41 +0200, Joan Balagueró wrote:
> Hello,
> 
> Thanks for your response. I suppose that this eviction policy that you are
> saying is achieved by using IdleConnectionTimeoutThread. Am I right?
> 
> Joan.

Yes, you are. You do not necessarily need a special thread to achieve
that. Just call HttpConnectionManager#closeIdleConnections method after
a period inactivity to purge stale connections:

http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/HttpConnectionManager.html#closeIdleConnections(long)

Oleg

>  
> 
> 
> -----Mensaje original-----
> De: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
> Enviado el: miércoles, 16 de julio de 2008 18:03
> Para: HttpClient User Discussion
> Asunto: Re: Pool running out of connections
> 
> On Wed, 2008-07-16 at 09:03 +0200, Joan Balagueró wrote:
> > Hello,
> > 
> >  
> > 
> > We have developed software that uses HttpClient 3.1. 
> > 
> >  
> > 
> > It has been working for 2 months. Recently though, we have been getting
> > 'Maximum number of simultaneous requests exceeded' errors.
> > 
> >  
> > 
> > We are using a multi-threaded pool with 100 connections. Our application
> > never has more than 10 simultaneous requests.
> > 
> >  
> > 
> > The error is “Socked closed”. These connections were established on the
> 14th
> > of July. The shutdown was done on the 15th of July (in other words, these
> > connections were open for more than a day). What we don't understand is
> how
> > it is possible that these connections can be open for so long when they
> have
> > a timeout of 26 seconds (which we assign in the PostMethod).
> > 
> >  
> 
> Socket timeout applies to _active_ read operations only. Idle
> connections cannot time out, as they are not blocked in a read
> operation.  
> 
> You should implement an eviction policy to close connections that have
> been idle for too long.
> 
> Hope this helps
> 
> Oleg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to