Author |
Message |
10/20/2010 21:22:36
|
helium
neo
Joined: 10/20/2010 21:05:11
Messages: 2
Offline
|
Hi,
i use ehCache as a temporary memory stack (serves as a cache). No serializable, just String Object.
All incoming HTTP request data are store in ehcache. And there is a asynch scheduler process that takes the data from ehcache by "getKeys()" and remove the key/value by removeElement(element) after storing them into a proprietary Database.
This system runs fine and smooth but when the system runs for sometime (1 hour), the memory was fully utilized (2.5GB) and all CPU time was taken to perform GC.
The asynch process log the remaining size of the cache everytime it start. The cache.getSize() maintain at around Max:3500, and Min:300 when it finish it work.
I thought there is a Memory Leak on this application. so i used Eclipse MAT to look at the Heap Dump (on a smaller memory utilization to avoid parsing 2.5GB of data). After running the Suspect Report, i got these comments from MAT:
One instance of "org.apache.catalina.session.StandardManager" loaded by "org.apache.catalina.loader.StandardClassLoader @ 0x853f0280" occupies 73,407,072 (76.05%) bytes. The memory is accumulated in one instance of "java.util.concurrent.ConcurrentHashMap$Segment[]" loaded by "<system class loader>".
and i found out that many empty collections that is not GC from the Top Consumer report:
Detected the following empty collections:
24,692 instances of java.util.Hashtable retain >= 4,345,728 bytes.
393,990 instances of java.util.concurrent.ConcurrentHashMap$Segment retain >= 50,430,720 bytes.
All the variable that related to the ehcache are at class's method level and no static define on them.
Any idea why GC unable to clean the cache?
(Updated)
Version of ehcache = 2.2.0
|
|
|
10/20/2010 21:30:38
|
gluck
qaestor
Joined: 09/15/2009 18:01:23
Messages: 179
Location: Brisbane, Australia
Offline
|
What version of Ehcache are you using?
|
|
|
10/20/2010 23:37:58
|
helium
neo
Joined: 10/20/2010 21:05:11
Messages: 2
Offline
|
What version of Ehcache are you using?
I am using ehcache-2.2.0
|
|
|
10/21/2010 13:28:15
|
dwai
journeyman
Joined: 10/15/2010 13:05:54
Messages: 14
Offline
|
Hi
Just a try please
Can u check the permsize parameter is set or not.
I am asking this bcoz normally classloading happens in that place and is not a part of the max heap size which can definitely bring down the objects in the heap as class will be getting loaded in the differnt space which will be mentioned in the permsize.
Few clarifications:
Did u notice any full GC to happen in the log
Hope there was a OOM issue, then also please share the log
|
Dwaipayan |
|
|
07/20/2011 22:21:41
|
rajoshi
seraphim
Joined: 07/04/2011 04:36:10
Messages: 1491
Offline
|
Issue seems to be resolved.Please let us know if more information is required.
|
Rakesh Joshi
Senior Consultant
Terracotta. |
|
|
07/18/2016 15:41:25
|
adas1
neo
Joined: 07/18/2016 15:39:19
Messages: 1
Offline
|
We are using ehcache-2.7.4 , the objects in the cache are not getting garbage collected.
One instance of "net.sf.ehcache.store.chm.SelectableConcurrentHashMap" loaded by "weblogic.utils.classloaders.GenericClassLoader @ 0x7014a3680" occupies 457,612,800 (22.48%) bytes. The memory is accumulated in one instance of "net.sf.ehcache.store.chm.SelectableConcurrentHashMap$Segment[]" loaded by "weblogic.utils.classloaders.GenericClassLoader @ 0x7014a3680".
The server needs to be restarted again and again , please provide suggestions .
|
|
|
|