Skip to main content
New Participant
January 8, 2019

Memory leak:Getting heap dump at my AEM publisher

  • January 8, 2019
  • 8 replies
  • 10346 views

Hi Team,

I am getting heap dump and GC on my AEM server when doing soak test the following is the report.

Problem Suspect 1

One instance of "org.apache.sling.models.impl.ModelAdapterFactory" loaded by "org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5 @ 0x5c7e3e280" occupies 214,336,312 (29.68%) bytes. The memory is accumulated in one instance of "java.util.concurrent.ConcurrentHashMap$Node[]" loaded by "<system class loader>".

Keywords
java.util.concurrent.ConcurrentHashMap$Node[]
org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5 @ 0x5c7e3e280
org.apache.sling.models.impl.ModelAdapterFactory

Details »

Problem Suspect 2

10,992 instances of "org.apache.jackrabbit.oak.segment.Segment", loaded by "org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5 @ 0x5c1c84e10" occupy 79,999,744 (11.08%) bytes. These instances are referenced from one instance of "com.google.common.cache.LocalCache$Segment[]", loaded by "org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5 @ 0x5c1c77e70"

Keywords
org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5 @ 0x5c1c77e70
com.google.common.cache.LocalCache$Segment[]
org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5 @ 0x5c1c84e10
org.apache.jackrabbit.oak.segment.Segment

Can someone tell me how to proceeds

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

8 replies

New Participant
January 9, 2019

According to what I see, is that you only have 800mb of heap space. Seems to me you did not pass Xms and Xmx parameters to your publish instance. A production instance needs more than 1gb ram. Give it some more breathing room. For example 4gb.

New Participant
January 9, 2019

Hi Thanks for your response

we have started JVM as per below

java -server -Xms8192m -Xmx8192m -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -XX:+UnlockDiagnosticVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -Xloggc:/mountpoint2/aem/crx-quickstart/logs/gc-2019_01_05-09_08.log -Dsling.run.modes=publish,uat,standalone,nosamplecontent,crx3,crx3tar -jar crx-quickstart/app/cq-quickstart-6.3.0-standalone-quickstart.jar start -c crx-quickstart -i launchpad -p 61003 -Dsling.properties=conf/sling.properties

New Participant
January 9, 2019

Kindly tell me if anything need to change in above start up script.