You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Markus Jelsma <ma...@openindex.io> on 2011/01/04 15:23:25 UTC

Replication: the web application [/solr] .. likely to create a memory leak

Hi,

Anyone seen this before when stopping of restarting Solr 1.4.1 running as 
slave under Tomcat 6?

SEVERE: The web application [/solr] appears to have started a thread named 
[MultiThreadedHttpConnectionManager cleanup] but has failed to stop it. This 
is very likely to create a memory leak.

It does _not_ happen when i set enable="false" in the slave part of the 
replication RH. I haven't tested it under Jetty because it can be reproduced 
by toggling replication only.

I think it somehow relates to my other issue where old index files are deleted. 
There is a connection between regularly restarting Tomcat and the problem 
showing up: http://www.mail-archive.com/solr-
user@lucene.apache.org/msg45067.html


It can also trigger multiple related exceptions errors:


Jan 4, 2011 3:18:13 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SEVERE: The web application [/solr] appears to have started a thread named 
[pool-1-thread-1] but has failed to stop it. This is very likely to create a 
memory leak.
Jan 4, 2011 3:18:13 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SEVERE: The web application [/solr] appears to have started a thread named 
[pool-3-thread-1] but has failed to stop it. This is very likely to create a 
memory leak.
Jan 4, 2011 3:18:13 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SEVERE: The web application [/solr] appears to have started a thread named 
[MultiThreadedHttpConnectionManager cleanup] but has failed to stop it. This 
is very likely to create a memory leak.


Below is a relevant part of the log with only one error:


Jan 4, 2011 3:09:47 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Jan 4, 2011 3:09:47 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=null path=null 
params={sort=sort_tijd+desc&start=0&event=firstSearcher&q=*:*&fq=catlevel1:"Boeken"&rows=30} 
hits=325104 status=0 QTime=31 
Jan 4, 2011 3:09:47 PM org.apache.solr.core.SolrCore close
INFO: []  CLOSING SolrCore org.apache.solr.core.SolrCore@5c5ddd3
Jan 4, 2011 3:09:47 PM org.apache.solr.core.SolrCore closeSearcher
INFO: [] Closing main searcher on request.
Jan 4, 2011 3:09:47 PM org.apache.solr.core.QuerySenderListener newSearcher
INFO: QuerySenderListener done.
Jan 4, 2011 3:09:47 PM org.apache.solr.search.SolrIndexSearcher close
INFO: Closing Searcher@35a8d460 main
        fieldValueCache{lookups=6,hits=0,hitratio=0.00,inserts=3,evictions=0,size=3,warmupTime=0,cumulative_lookups=6,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=3,cumulative_evictions=0,item_f_bijzonderheden={field=f_bijzonderheden,memSize=13062096,tindexSize=52,time=21,phase1=10,nTerms=4,bigTerms=0,termInstances=665,uses=1},item_f_autoaccessoires={field=f_autoaccessoires,memSize=14156450,tindexSize=46,time=562,phase1=541,nTerms=19,bigTerms=0,termInstances=1077665,uses=1},item_f_sp_eigenschappen={field=f_sp_eigenschappen,memSize=13062188,tindexSize=46,time=186,phase1=125,nTerms=3,bigTerms=1,termInstances=436,uses=1}}
        filterCache{lookups=130,hits=125,hitratio=0.96,inserts=183,evictions=0,size=157,warmupTime=0,cumulative_lookups=130,cumulative_hits=125,cumulative_hitratio=0.96,cumulative_inserts=183,cumulative_evictions=0}
        queryResultCache{lookups=308,hits=124,hitratio=0.40,inserts=184,evictions=0,size=157,warmupTime=0,cumulative_lookups=308,cumulative_hits=124,cumulative_hitratio=0.40,cumulative_inserts=184,cumulative_evictions=0}
        documentCache{lookups=4046,hits=2096,hitratio=0.51,inserts=1950,evictions=0,size=1933,warmupTime=0,cumulative_lookups=4046,cumulative_hits=2096,cumulative_hitratio=0.51,cumulative_inserts=1950,cumulative_evictions=0}
Jan 4, 2011 3:09:47 PM org.apache.solr.update.DirectUpdateHandler2 close
INFO: closing 
DirectUpdateHandler2{commits=0,autocommits=0,optimizes=0,rollbacks=0,expungeDeletes=0,docsPending=0,adds=0,deletesById=0,deletesByQuery=0,errors=0,cumulative_adds=0,cumulative_deletesById=0,cumulative_deletesByQuery=0,cumulative_errors=0}
Jan 4, 2011 3:09:47 PM org.apache.solr.update.DirectUpdateHandler2 close
INFO: closed 
DirectUpdateHandler2{commits=0,autocommits=0,optimizes=0,rollbacks=0,expungeDeletes=0,docsPending=0,adds=0,deletesById=0,deletesByQuery=0,errors=0,cumulative_adds=0,cumulative_deletesById=0,cumulative_deletesByQuery=0,cumulative_errors=0}
Jan 4, 2011 3:09:47 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SEVERE: The web application [/solr] appears to have started a thread named 
[MultiThreadedHttpConnectionManager cleanup] but has failed to stop it. This 
is very likely to create a memory leak.
Jan 4, 2011 3:09:48 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080


-- 
Markus Jelsma - CTO - Openindex
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350

Re: Replication: the web application [/solr] .. likely to create a memory leak

Posted by Markus Jelsma <ma...@openindex.io>.
I have no Windows.

On Tuesday 04 January 2011 23:20:00 Lance Norskog wrote:
> Is this on Windows or Unix? Windows will not delete a file that is still
> open.
> 
> On Tue, Jan 4, 2011 at 10:07 AM, Markus Jelsma
> 
> <ma...@openindex.io> wrote:
> > Is it possible this problem has something to do with my old index files
> > not being removed? This problem only surfaces in my setup when i restart
> > with replication on the slave. I can confirm that for some reason my
> > replicated indexes get messed up only when i start restarting Tomcat
> > several times.
> > 
> > On Tuesday 04 January 2011 15:48:31 Yonik Seeley wrote:
> >> On Tue, Jan 4, 2011 at 9:34 AM, Robert Muir <rc...@gmail.com> wrote:
> >> >    [junit] WARNING: test class left thread running:
> >> > Thread[MultiThreadedHttpConnectionManager cleanup,5,main]
> >> 
> >> I suppose we should move MultiThreadedHttpConnectionManager to
> >> CoreContainer.
> >> 
> >> -Yonik
> >> http://www.lucidimagination.com
> > 
> > --
> > Markus Jelsma - CTO - Openindex
> > http://www.linkedin.com/in/markus17
> > 050-8536620 / 06-50258350

-- 
Markus Jelsma - CTO - Openindex
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350

Re: Replication: the web application [/solr] .. likely to create a memory leak

Posted by Markus Jelsma <ma...@openindex.io>.
I don't have Windows :)

> Is this on Windows or Unix? Windows will not delete a file that is still
> open.
> 
> On Tue, Jan 4, 2011 at 10:07 AM, Markus Jelsma
> 
> <ma...@openindex.io> wrote:
> > Is it possible this problem has something to do with my old index files
> > not being removed? This problem only surfaces in my setup when i restart
> > with replication on the slave. I can confirm that for some reason my
> > replicated indexes get messed up only when i start restarting Tomcat
> > several times.
> > 
> > On Tuesday 04 January 2011 15:48:31 Yonik Seeley wrote:
> >> On Tue, Jan 4, 2011 at 9:34 AM, Robert Muir <rc...@gmail.com> wrote:
> >> >    [junit] WARNING: test class left thread running:
> >> > Thread[MultiThreadedHttpConnectionManager cleanup,5,main]
> >> 
> >> I suppose we should move MultiThreadedHttpConnectionManager to
> >> CoreContainer.
> >> 
> >> -Yonik
> >> http://www.lucidimagination.com
> > 
> > --
> > Markus Jelsma - CTO - Openindex
> > http://www.linkedin.com/in/markus17
> > 050-8536620 / 06-50258350

Re: Replication: the web application [/solr] .. likely to create a memory leak

Posted by Lance Norskog <go...@gmail.com>.
Is this on Windows or Unix? Windows will not delete a file that is still open.

On Tue, Jan 4, 2011 at 10:07 AM, Markus Jelsma
<ma...@openindex.io> wrote:
> Is it possible this problem has something to do with my old index files not
> being removed? This problem only surfaces in my setup when i restart with
> replication on the slave. I can confirm that for some reason my replicated
> indexes get messed up only when i start restarting Tomcat several times.
>
> On Tuesday 04 January 2011 15:48:31 Yonik Seeley wrote:
>> On Tue, Jan 4, 2011 at 9:34 AM, Robert Muir <rc...@gmail.com> wrote:
>> >    [junit] WARNING: test class left thread running:
>> > Thread[MultiThreadedHttpConnectionManager cleanup,5,main]
>>
>> I suppose we should move MultiThreadedHttpConnectionManager to
>> CoreContainer.
>>
>> -Yonik
>> http://www.lucidimagination.com
>
> --
> Markus Jelsma - CTO - Openindex
> http://www.linkedin.com/in/markus17
> 050-8536620 / 06-50258350
>



-- 
Lance Norskog
goksron@gmail.com

Re: Replication: the web application [/solr] .. likely to create a memory leak

Posted by Markus Jelsma <ma...@openindex.io>.
Is it possible this problem has something to do with my old index files not 
being removed? This problem only surfaces in my setup when i restart with 
replication on the slave. I can confirm that for some reason my replicated 
indexes get messed up only when i start restarting Tomcat several times.

On Tuesday 04 January 2011 15:48:31 Yonik Seeley wrote:
> On Tue, Jan 4, 2011 at 9:34 AM, Robert Muir <rc...@gmail.com> wrote:
> >    [junit] WARNING: test class left thread running:
> > Thread[MultiThreadedHttpConnectionManager cleanup,5,main]
> 
> I suppose we should move MultiThreadedHttpConnectionManager to
> CoreContainer.
> 
> -Yonik
> http://www.lucidimagination.com

-- 
Markus Jelsma - CTO - Openindex
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350

Re: Replication: the web application [/solr] .. likely to create a memory leak

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Jan 4, 2011 at 9:34 AM, Robert Muir <rc...@gmail.com> wrote:
>    [junit] WARNING: test class left thread running:
> Thread[MultiThreadedHttpConnectionManager cleanup,5,main]

I suppose we should move MultiThreadedHttpConnectionManager to CoreContainer.

-Yonik
http://www.lucidimagination.com

Re: Replication: the web application [/solr] .. likely to create a memory leak

Posted by Robert Muir <rc...@gmail.com>.
On Tue, Jan 4, 2011 at 9:23 AM, Markus Jelsma
<ma...@openindex.io> wrote:
> Hi,
>
> Anyone seen this before when stopping of restarting Solr 1.4.1 running as
> slave under Tomcat 6?
>
> SEVERE: The web application [/solr] appears to have started a thread named
> [MultiThreadedHttpConnectionManager cleanup] but has failed to stop it. This
> is very likely to create a memory leak.
>
> It can also trigger multiple related exceptions errors:
>
>
> Jan 4, 2011 3:18:13 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/solr] appears to have started a thread named
> [pool-1-thread-1] but has failed to stop it. This is very likely to create a
> memory leak.

fyi, you can also see this by running its unit test:

    [junit] Testsuite: org.apache.solr.handler.TestReplicationHandler
    [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 25.997 sec
    [junit] ------------- Standard Error -----------------
    [junit] WARNING: test class left thread running:
Thread[MultiThreadedHttpConnectionManager cleanup,5,main]
    [junit] WARNING: test class left thread running:
Thread[pool-44-thread-1,5,main]