eclipse memory analyzer sees small part (363,2MB) of entire heap dump (8GB)

后端 未结 4 566
醉梦人生
醉梦人生 2020-12-16 03:54

I was trying to investigate java.lang.OutOfMemoryError: GC limit exceeded which occurs at high load of our web app deployed in tomcat. Heap size was set to 8GB

4条回答
  •  一向
    一向 (楼主)
    2020-12-16 04:43

    Actually I don't recommend that you use the jmap utility when you are troubleshooting a java.lang.OutOfMemoryError: GC limit exceeded problem. I have seen problems with this approach while the JVM is trashing (excessive # of major collections).

    Please try the following approach instead and see if you get better results from the MAT parsing & analysis process:

    • Add the following JVM HotSpot parameter -XX:+HeapDumpOnOutOfMemoryError
    • Replicate the problem again and wait for the OOM event. The heap dump generation should be much faster which will increase the value and validity of the data.
    • The JVM will then generate a JVM Heap Dump (HPROF format) following the OOM event.
    • Load the JVM Heap Dump again in MAT and see if you are getting better results e.g. bigger heap footprint.

    Regards, P-H

提交回复
热议问题