Thanks Oleg, is there anything I can do in the pool configuration to mitigate 
this effect?

-----Mensaje original-----
De: Oleg Kalnichevski [mailto:ol...@apache.org] 
Enviado el: lunes, 3 de octubre de 2016 21:32
Para: HttpClient User Discussion
Asunto: Re: TimeoutException in async pool

On Mon, 2016-10-03 at 10:45 +0200, Joan Balagueró wrote:
> Thanks Stefan and yes, that's right. And I already told my client to modify 
> these settings. But I still have the doubt about why a Timeout exception in a 
> pool that has no upper limit in the number of pooled connections. 
> 
> 

This is because of the lock contention.

Oleg

> -----Mensaje original-----
> De: Stefan Magnus Landrø [mailto:stefan.lan...@gmail.com] Enviado el: 
> lunes, 3 de octubre de 2016 9:00
> Para: HttpClient User Discussion
> Asunto: Re: TimeoutException in async pool
> 
> So - first I'd set pool size to 50 since that's all you need on average. Then 
> set acquisition timeout to something that makes sense. 10-20ms?
> 
> Sendt fra min iPhone
> 
> > Den 3. okt. 2016 kl. 07.32 skrev Joan Balagueró 
> > <joan.balagu...@grupoventus.com>:
> > 
> > Hello,
> > 
> > I’m using the async PoolingNHttpClientConnectionManager (v 4.1.2).
> > 
> > Occasionally I’m getting this error:
> > 
> > java.util.concurrent.TimeoutException
> >        at
> > org.apache.http.nio.pool.AbstractNIOConnPool.processPendingRequest(A
> > bs
> > tractN
> > IOConnPool.java:364)
> >        at
> > org.apache.http.nio.pool.AbstractNIOConnPool.lease(AbstractNIOConnPool.java:
> > 276)
> >        at
> > org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.re
> > qu
> > estCon
> > nection(PoolingNHttpClientConnectionManager.java:266)
> >        at
> > org.apache.http.impl.nio.client.AbstractClientExchangeHandler.reques
> > tC
> > onnect
> > ion(AbstractClientExchangeHandler.java:363)
> >        at
> > org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.sta
> > rt
> > (Defau
> > ltClientExchangeHandlerImpl.java:125)
> >        at
> > org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(Inte
> > rn
> > alHttp
> > AsyncClient.java:141)
> >        at
> > org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(Clo
> > se
> > ableHt
> > tpAsyncClient.java:68)
> > 
> > 
> > It seems that all connections in pool are busy. But my setup says:
> > 
> > this.phccm = new PoolingNHttpClientConnectionManager(…);
> > this.phccm.setMaxTotal(Integer.MAX_VALUE);
> > this.phccm.setDefaultMaxPerRoute(Integer.MAX_VALUE);
> > 
> > 
> > I don't have more than 1000 requests per second, and the average 
> > response time is less than 20ms.
> > 
> > What could be the reason for this error?
> > 
> > Thanks,
> > Joan.
> > 
> > 
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
> > For additional commands, e-mail: httpclient-users-h...@hc.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
> For additional commands, e-mail: httpclient-users-h...@hc.apache.org
> 



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




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

Reply via email to