Hello,

 

When I shutdown my ‘CloseableHttpAsyncClient’instance (that has set a
‘PoolingAsyncClientConnectionManager’) a thread called ‘httpclient-main-1’
is not stopped and the following message is logged in tomcat log:

 

22-Feb-2019 13:00:59.326 ADVERTENCIA [localhost-startStop-1]
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The
web application [ROOT] appears to have started a thread named
[httpclient-main-1] but has failed to stop it. This is very likely to create
a memory leak. Stack trace of thread:

sun.misc.Unsafe.park(Native Method)

java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)

java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(
AbstractQueuedSynchronizer.java:2039)

java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)

java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074
)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
34)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
24)

java.lang.Thread.run(Thread.java:748)

 

Our code to shutdown:

public void stop() throws IOException

{ 

  this.phccm.close(CloseMode.GRACEFUL); // close the
‘PoolingAsyncClientConnectionManager’’ gracefully

  this.objHttp.close();                 // close the
‘CloseableHttpAsyncClient’instance 

}

 

Is this something I’m forgetting to close or it’s a matter of the
Httpclient?

 

Thanks,

 

Joan.

 

 

Reply via email to