hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Potapov <potapo...@gmail.com>
Subject AbstractNIOConnPool.processPendingRequests is never called?
Date Wed, 27 Nov 2013 18:09:29 GMT
Hello everyone,

I've got OOM today and trying to understand if I'm using HttpAsyncClient wrong.

So. I have HttpAsyncClient sending 100-150 requests per second to single remote
host. Connection request timeout is 50 ms, connect timeout is 25 ms, socket
timeout is 100 ms.
In heap dump I've found about 200,000 LeaseRequest object. Since
completedRequests is cleaned in the end of each lease(...) function call, I'm
pretty sure that this is a leasingRequests.

Looks like that remote host went down for a while and stopped requests
processing. So, CPool started to accumulate lease requests and after several
hours tons of accumulated LeaseRequest objects caused OOM.
I've tried to find where leasingRequests must be cleaned and found that only
function which performs cleanup by request deadline is
AbstractNIOConnPool.processPendingRequests() which is called only by
PoolingNHttpClientConnectionManager.closeIdleConnections() or

So, my question is, should I call this functions periodically on my side, or
there is another leasingRequests clean up mechanism which I didn't take into

Thanks in advance,
Dmitry Potapov

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

View raw message