lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Tebbs <l...@staffing-systems.co.uk>
Subject Re: java.lang.OutOfMemoryError: PermGen space when reopening solr server
Date Wed, 01 Sep 2010 21:23:37 GMT

Have you tried to up the MaxHeapSize?

I tend to run solr and the development instance in a separate jetty (on 
a separate port) and actually restart the web server for the dev 
application every now and again.
It doesn't take too long if you only have one webapp on jetty - I tend 
to use mvn jetty:run on the CLI rather than launch jetty in eclipse. I 
also use JRebel to reduce the number of restarts needed during dev.

As for a production instance, should you need to redeploy that often?

Luke

Antonio Calo' wrote:
>  Hi guys
>
> I'm facing an error in our production environment with our search 
> application based on maven with spring + solrj.
>
> When I try to change a class, or try to redeploy/restart an 
> application, I catch a java.lang.OutOfMemoryError: PermGen
>
> I've tryed to understand the cause of this and also I've succeded in 
> reproducing this issue on my local develop environment by just 
> restarting the jetty several time (I'm using eclipse + maven plugin).
>
> The logs obtained are those:
>
>    [...]
>    1078 [Timer-1] INFO org.apache.solr.core.RequestHandlers - created
>    /admin/: org.apache.solr.handler.admin.AdminHandlers
>    1078 [Timer-1] INFO org.apache.solr.core.RequestHandlers - created
>    /admin/ping: PingRequestHandler
>    1078 [Timer-1] INFO org.apache.solr.core.RequestHandlers - created
>    /debug/dump: solr.DumpRequestHandler
>    32656 [Finalizer] INFO org.apache.solr.core.SolrCore - []  CLOSING
>    SolrCore org.apache.solr.core.SolrCore@1409c28
>    17:43:19 ERROR InvertedIndexEngine:124 open -
>    java.lang.OutOfMemoryError: PermGen space
>    java.lang.RuntimeException: java.lang.OutOfMemoryError: PermGen space
>         at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1068)
>         at org.apache.solr.core.SolrCore.<init>(SolrCore.java:579)
>         at
>    
> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137) 
>
>         at
>    
> com.intellisemantic.intellifacet.resource.invertedIndex.InvertedIndexEngine.open(InvertedIndexEngine.java:113)

>
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>    
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>
>         at
>    
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
>    
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)

>
>         at
>    
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)

>
>         at
>    
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)

>
>    [...]
>
> The exception is always thrown while solr init is performed after a 
> restart (this is the reason why I'm asking your support ;) )
>
> It seems that while solr is trying to be set up (by [Timer-1]), 
> another thread ([Finalizer]) is trying to close it. I can see from the 
> Solr code that this exception is thrown always in the same place: 
> SolrCore.java:1068.
> Here there is a comment that say:
>
>    // need to close the searcher here??? we shouldn't have to.
>           throw new RuntimeException(th);
>         } finally {
>           if (newestSearcher != null) {
>             newestSearcher.decref();
>           }
>         }
>
> I'm using slorj lib in a Spring container, so I'm supposing that 
> Spring will manage the relase of all the singleton classes. Should I 
> do something other like force closing solr?
>
> Thanks in advance for your support.
>
> Best regards
>
> Antonio
>


Mime
View raw message