lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <s...@elyograg.org>
Subject Re: Random OOM Exceptions
Date Thu, 14 Aug 2014 15:22:37 GMT
On 8/14/2014 7:46 AM, Scott Rankin wrote:
> I¹m running a Solr setup and am getting occasional periods where memory
> usage and GC just spike out of nowhere (unrelated to traffic).  I¹m hoping
> someone can shed some light.  Here¹s the setup:
>
> - Solr 4.3.1, Oracle JDK 1.7.0_51 64 bit on CentOS 6.5
> - We have 2 Solr servers, one acting as a master that receives all the
> writes, and one that is replicating from the master and handles all the
> reads
> - JVM parameters are:
>
> -Djava.io.tmpdir=/usr/local/solr/solr-tomcat/temp
> -Dcatalina.home=/usr/local/solr/solr-tomcat
> -Dcatalina.base=/usr/local/solr/solr-tomcat
> -Djava.endorsed.dirs=/usr/local/solr/solr-tomcat/endorsed
> -XX:+DisableExplicitGC
> -XX:GCTimeRatio=9
> -XX:MaxGCPauseMillis=1500
> -XX:+UseParallelGC
> -Xss512k
> -XX:MaxPermSize=256m
> -Xmx3096m
> -Xms64m
> -Dlog4j.configuration=file:///usr/local/solr/solr-tomcat/conf/solr-log4j.pr
> operties
> -Dsolr.solr.home=/usr/local/solr/solr-home
> -Duser.timezone=GMT
> -javaagent:/usr/local/solr/solr-tomcat/newrelic/newrelic.jar
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.util.logging.config.file=/usr/local/solr/solr-tomcat/conf/logging.pr
> operties
>
>
> We have one active core, the index is about 2.17 GB with around 6 million
> documents.
>
> The issue that we see is that every so often, heap memory will spike, GC
> percentage will go to 100%, and we¹ll see OOM errors.  There¹s no change
> in traffic patterns as far as we can tell.  According to New Relic, it¹s
> the Old Gen that¹s running out of space. The OOM stack trace is below.
> I¹d be very grateful for any help you can offer!
>
> Thanks,
> Scott
>
> ERROR - 2014-08-13 22:45:53.252; org.apache.solr.common.SolrException;
> null:java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap
> space

When you actually get anOutOfMemoryErrorexception, it means that the
program is trying to allocate more memory than you have told it it's
allowed to allocate.  In your case, you've limited it to 3096
megabytes.  This is not the same thing as garbage collection, although
the low memory situation will usually lead to a LOT of GC activity.

This specific section of the following wiki page lists some of the
reasons that your Solr install might be using a lot of heap memory. 
Later it describes some things you can do to reduce heap requirements:

http://wiki.apache.org/solr/SolrPerformanceProblems#Java_Heap

It's a good idea to read the entire wiki page, including the parts that
come before the Java Heap section that is directly linked above, and the
other wiki pages linked at the top of that page.

Thanks,
Shawn


Mime
View raw message