Need Help with Memory Leak Issues


EJB design: Need Help with Memory Leak Issues

  1. Need Help with Memory Leak Issues (2 messages)

    As with any new application being developed we here at sys admin team are facing the challage to work on an application which is doing frequest ParNew and Concurrent GC collections, and over time the Heap fills up to a point where the JVM cannot reclaim anymore. Although these maybe classic signs of a Memory Leak, can someone please review the 2 setting that are impleted and recommend if any additional tweaks can help stabalize the applciation. We are running JDK 1.6.06, AS3 on 4CPU hyper threading platform (Intel x86) The applciation is using a combination of Spring/HIbernate and ehcache. First setting: -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:NewSize=256m -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 =========================== New Settings: -Xms2048m -Xmx2048m -XX:MaxPermSize=512m -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:NewSize=768m -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 Thanks
  2. Are you getting oom? If so which area is responsible for this? Run verbose GC to find out the root cause of oom. What is the max number of threads you are starting? If Eden in throwing oom then I dont believe it is memory leak? The other approach is take the heap dump and see how many instances of each class you are creating?
  3. Why one would need to do this? If any of your third party Jars/ apps are invoking System.gc(), to free any resources? -XX:+DisableExplicitGC , will disable the desired efffect of any System.gc() invocations, though the GC is on the will of the VM. try XX:+UseParallelGC without -XX:+DisableExplicitGC and see what is happening.