7 Replies Latest reply on Jun 24, 2010 9:39 PM by Samuel Cai

    Can't locate memory leak - possibly cache?

    Michal Glowacki Novice



      I am running JBoss AS 5.1 with some web applications. I run jboss using following jvm config:



      1.   set JAVA_OPTS=%JAVA_OPTS% -Xms4g -Xmx4g -XX:MaxPermSize=512m -XX:NewRatio=3 
      2. set JAVA_OPTS=%JAVA_OPTS% -XX:+UseParallelGC -Dsun.rmi.dgc.client.gcInterval=180000 -Dsun.rmi.dgc.server.gcInterval=180000 -Dcom.sun.management.jmxremote   



      After start my java.exe process occupies around 2GB of ram. After few hours it's becoming 4,7GB and is almost inaccessible...


      I tried YourKit profiler, Eclipse Memory Analyzer with dump from jmap. Nothing, when my jboss java.exe process was 3,5GB, the analyze shown 2 possible memory leaks:


      - 10 instances of org.apache.catalina.session.StandardManager, loaded by org.jboss.classloader.spi.base.BaseClassLoader @ 0xa9070438 occupy 276,022,464 (16.18%) bytes.


      - 701 instances of org.jboss.virtual.plugins.context.zip.ZipEntryContext, loaded by org.jboss.bootstrap.NoAnnotationURLClassLoader @ 0x9fff7dc0 occupy 221,926,760 (13.01%) bytes.


      This actually tells me nothing.


      However YourKit shows 7500 instances of EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock


      Also when I list class the biggest retained size belongs to ConcurrentHashMap, Also listing in jmx-console: jboss.cach.CacheJmxWrapper shows number of nodes growing, at 3,5GB it contains 3500 nodes, 5000 nodes at 4,5GB.


      I'm stuck and don't know what to try next. Anybody has an idea?