Greeting,
We are facing memory leak issue recently on one of our apps.
Development environment : Lucene2.4.0, hibernate search3.2.0, hibernate 3.5.0, spring2.5 and ehcache 1.4.1
The problem is that memory in old gen gradually goes up in a time period. Eventually, JVM runs out of memory as we see from jvm stats that old generation capacity reaches the maximum. As a result, I have to restart web to release all memory.
I generated a heap dump from app and use memory analyzer to check it. I see this:
123,726 instances of "org.apache.lucene.index.TermInfosReader$ThreadResources", loaded by "org.apache.catalina.loader.WebappClassLoader @ 0x7f5d71ffe3c8" occupy 3,139,449,272 (79.54%) bytes. These instances are referenced from one instance of "java.util.concurrent.ConcurrentHashMap$Segment[]", loaded by "<system class loader>"
Keywords
java.util.concurrent.ConcurrentHashMap$Segment[]
org.apache.lucene.index.TermInfosReader$ThreadResources
org.apache.catalina.loader.WebappClassLoader @ 0x7f5d71ffe3c8
Code:
Biggest Top-Level Dominator Packages:
org.apache.catalina.loader.WebappClassLoader @ 0x7f5d71ffe3c8 90%
Retained Heap Retained Heap # Top Dominators
org.apache.lucene.index (package) 3,337,164,168 84.55% 1,018,753
.TermInfosReader$ThreadResources 3,139,449,272 79.54% 123,727
.ReadOnlySegmentReader 63,653,808 1.61% 2,976
.SegmentReader 54,508,184 1.38% 1,270
.Term 51,717,232 1.31% 876,567
Total: 4 entries 3,309,328,496 1,004,540
Can you give me some advices please?
thanks