: I am using the SolrJ client's StreamingUpdateSolrServer and when ever i : stop tomcat, it throws a memory leak warning. sample error message: : : SEVERE: The web application [/MyApplication] appears to have started a : thread named [pool-1004-thread-1] but has failed to stop it. This is very : likely to create a memory leak.
as part of the SolrCloud work (SOLR-2358) a "shutdown()" method was added to CommonsHttpSolrServer (and StreamingUpdateSolrServer) to instruct it to shutdown the HttpClient it wraps (if it created it). So if you are using trunk, you should call that when you are done with the StreamingUpdateSolrServer object. As a workarround in 3x, you can instantiate the HttpClient yourself using the MultiThreadedHttpConnectionManager, and pass it to the StreamingUpdateSolrServer constructor. then when your app shuts down, you can call shutdown on the HttpClient. alternately: the minimal ammount of change you can make to work arround tthis would be to add a call to the static method... MultiThreadedHttpConnectionManager.shutdownAll(); ...some where in your app's shutdown code (assuming it doesn't cause problems with any subsequent shutdown code) -Hoss