You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by Snehal Chennuru <sn...@gmail.com> on 2012/09/09 23:28:17 UTC
OOM with Lucene 3.6 & Jrockit
Recently, we have upgrade my application's Lucene version from 2.4 to 3.6.
After the upgrade, for large datasets I am seeing an OOM.
Following is the exception stack trace:
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) Exception in thread
"Load thread" java.lang.OutOfMemoryError: classblock allocation, 2814576
loaded, 2816K footprint, in check_alloc
(src/jvm/model/classload/classalloc.c:215).
Attempting to allocate 4320M bytes
There is insufficient native memory for the Java
Runtime Environment to continue.
Possible reasons:
The system is out of physical RAM or swap space
In 32 bit mode, the process size limit was hit
Possible solutions:
Reduce memory load on the system
Increase physical memory or swap space
Check if swap backing store is full
Use 64 bit Java on a 64 bit OS
Decrease Java heap size (-Xmx/-Xms)
Decrease number of Java threads
Decrease Java thread stack sizes (-Xss)
Disable compressed references (-XXcompressedRefs=false)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
java.lang.ClassLoader.defineClass1(Native Method)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
java.lang.ClassLoader.defineClass(ClassLoader.java:615)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
java.net.URLClassLoader.access$000(URLClassLoader.java:58)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
java.net.URLClassLoader$1.run(URLClassLoader.java:197)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
java.net.URLClassLoader.findClass(URLClassLoader.java:190)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
java.lang.ClassLoader.loadClass(ClassLoader.java:247)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
org.apache.log4j.spi.ThrowableInformation.getThrowableStrRep(ThrowableInformation.java:87)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
org.apache.log4j.spi.LoggingEvent.getThrowableStrRep(LoggingEvent.java:413)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:313)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
org.apache.log4j.RollingFileAppender.subAppend(RollingFileAppender.java:276)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
org.apache.log4j.Category.callAppenders(Category.java:206)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
org.apache.log4j.Category.forcedLog(Category.java:391)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
org.apache.log4j.Category.warn(Category.java:1060)
2012-09-08 18:08:56,341 WARN [STDERR] (Load thread:) at
com.teneo.esa.common.util.Logger.printStack(Logger.java:584)
JVM details:
Jrockit R28.2.3, Xms4320m, Xmx4320m.
The code under question is trying to fetch all the documents one at a time
from the index. Does this have any problems?
Thanks,
Snehal
--
View this message in context: http://lucene.472066.n3.nabble.com/OOM-with-Lucene-3-6-Jrockit-tp4006487.html
Sent from the Lucene - General mailing list archive at Nabble.com.
RE: OOM with Lucene 3.6 & Jrockit
Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,
Have you read http://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html ? Especially the last part about configuring your system correctly for mmap is important. Mmap can handle index files with hundreds of Gigabytes on systems with less physical RAM, you just have to define the ulimit settings correctly.
Uwe
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de
> -----Original Message-----
> From: Snehal Chennuru [mailto:snehal.kumar@gmail.com]
> Sent: Tuesday, September 11, 2012 12:52 AM
> To: general@lucene.apache.org
> Subject: Re: OOM with Lucene 3.6 & Jrockit
>
> It turns out that using MMapDirectory was causing OOM exception as the index
> size was over 20GB. Changed it to use SimpleFSDirectory avoids this issue.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/OOM-with-
> Lucene-3-6-Jrockit-tp4006487p4006747.html
> Sent from the Lucene - General mailing list archive at Nabble.com.
Re: OOM with Lucene 3.6 & Jrockit
Posted by Snehal Chennuru <sn...@gmail.com>.
It turns out that using MMapDirectory was causing OOM exception as the index
size was over 20GB. Changed it to use SimpleFSDirectory avoids this issue.
--
View this message in context: http://lucene.472066.n3.nabble.com/OOM-with-Lucene-3-6-Jrockit-tp4006487p4006747.html
Sent from the Lucene - General mailing list archive at Nabble.com.