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(AbstractN
> IOConnPool.java:364)
>        at
> org.apache.http.nio.pool.AbstractNIOConnPool.lease(AbstractNIOConnPool.java:
> 276)
>        at
> org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.requestCon
> nection(PoolingNHttpClientConnectionManager.java:266)
>        at
> org.apache.http.impl.nio.client.AbstractClientExchangeHandler.requestConnect
> 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(InternalHttp
> AsyncClient.java:141)
>        at
> org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHt
> 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
> 

Reply via email to