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. 


-----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(Abs
> tractN
> IOConnPool.java:364)
>        at
> org.apache.http.nio.pool.AbstractNIOConnPool.lease(AbstractNIOConnPool.java:
> 276)
>        at
> org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.requ
> estCon
> nection(PoolingNHttpClientConnectionManager.java:266)
>        at
> org.apache.http.impl.nio.client.AbstractClientExchangeHandler.requestC
> onnect
> ion(AbstractClientExchangeHandler.java:363)
>        at
> org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.start
> (Defau
> ltClientExchangeHandlerImpl.java:125)
>        at
> org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(Intern
> alHttp
> AsyncClient.java:141)
>        at
> org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(Close
> 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

Reply via email to