Can VisualVM profiling be used with AEM? | Community
Skip to main content
jkpanera
Level 4
March 21, 2019

Can VisualVM profiling be used with AEM?

  • March 21, 2019
  • 2 replies
  • 5159 views

Every time I turn the profiler on it hangs. I can't get responses back from my searches. I set up visualVM as per the standard Oracle docs (Java VisualVM) and connected to my AEM (author) instance and turn profiling on but whenever I make a request, it simply hangs.

Has any one used VisualVM profiling with AEM successfully? Is there anything special that I need to do?

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

2 replies

Gaurav-Behl
Level 10
March 21, 2019

It should work per Monitoring and Maintaining Your AEM instance

Try this: java - VisualVM Calibration Step Hangs with Windows 10 - Stack Overflow

The solution is to start VisualVM from command-line using:

jvisualvm.exe "-J-Dorg.netbeans.profiler.separateConsole=true"
jkpanera
jkpaneraAuthor
Level 4
March 21, 2019

I'm actually running on OS X not Windows 10. I tried your suggestion anyway and it doesn't seem to help. Still hangs.

Gaurav-Behl
Level 10
March 21, 2019

Try this to see the errors (if any) in terminal

jvisualvm "-J-Dnetbeans.logger.console=true"

March 22, 2019

As per Monitoring and Management Using JMX Technology - Java SEMonitoring and Management Guide -

Password authentication for remote monitoring is enabled by default. To disable it, set the following system property when you start the Java VM.

You could either try - -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

or provide password using -Dcom.sun.management.jmxremote.password.file

Couple of references -

jkpanera
jkpaneraAuthor
Level 4
April 30, 2019

I tried that option but it still hangs when I try to start profiling.

Peter_Puzanovs
Community Advisor
Community Advisor
May 1, 2019

Dear J,

Just tried connecting from Windows 10(latest update from Microsoft) to AEM 6.4 SP2 with

java version "1.8.0_201"

Java(TM) SE Runtime Environment (build 1.8.0_201-b09)

Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

and visualvm_142 works like magic.

When starting both AEM and visual_vm make sure you have sufficient permissions to run both applications. As some corporate laptops are locked from doing even basic functionality.

Regards,

Peter