lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Calo' <>
Subject java.lang.OutOfMemoryError: PermGen space when reopening solr server
Date Wed, 01 Sep 2010 16:20:08 GMT
  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(
         at org.apache.solr.core.SolrCore.<init>(
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at java.lang.reflect.Method.invoke(

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:
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) {

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


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message