Tracking down a memory leak / garbage-collection issue in Java

后端 未结 7 1168
故里飘歌
故里飘歌 2020-12-02 04:34

This is a problem I have been trying to track down for a couple months now. I have a java app running that processes xml feeds and stores the result in a database. There hav

7条回答
  •  遥遥无期
    2020-12-02 05:20

    Can you run the production box with JMX enabled?

    -Dcom.sun.management.jmxremote
    -Dcom.sun.management.jmxremote.port=
    ...
    

    Monitoring and Management Using JMX

    And then attach with JConsole, VisualVM?

    Is it ok to do a heap dump with jmap?

    If yes you could then analyze the heap dump for leaks with JProfiler (you already have), jhat, VisualVM, Eclipse MAT. Also compare heap dumps that might help to find leaks/patterns.

    And as you mentioned jakarta-commons. There is a problem when using the jakarta-commons-logging related to holding onto the classloader. For a good read on that check

    A day in the life of a memory leak hunter (release(Classloader))

提交回复
热议问题