1

Given a java application running in flexible environment, how is it possible to get a heap dump to see the heavy objects? I would ideally import this into a tool like eclipse mat and analyze the heap dump. Another great option would be for stackdriver profiler showing it but i just see there cpu profiling but not memory profiling

David Michael Gang
  • 7,107
  • 8
  • 53
  • 98

1 Answers1

2

You can connect to a Flex instance with ssh in a similar fashion that you connect to GCE VM instances. Read more about it here. Once connected you can get the heap dump like you usually do.

A.Queue
  • 1,549
  • 6
  • 21
  • i have now just a problem that making jmap with live option kills my server but this is a different problem. – David Michael Gang Sep 20 '18 at 06:53
  • We have connected to the instance but it seems that you can only run jmap/jcmd from the user that started the JVM. Do you know of a way around this? rror attaching to process: sun.jvm.hotspot.debugger.DebuggerException: cannot open binary file sun.jvm.hotspot.debugger.DebuggerException: sun.jvm.hotspot.debugger.DebuggerException: cannot open binary file – Nir May 10 '19 at 15:57