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 .closeExpiredConnections(). 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 account? -- Thanks in advance, Dmitry Potapov --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
