tomcat - their classes from previous runs are still loaded in memory

后端 未结 2 2020
-上瘾入骨i
-上瘾入骨i 2020-12-28 11:05

when stop my project , tomcat say :

The following web applications were stopped (reloaded, undeployed), but their classes from previous runs are still loaded in m

2条回答
  •  青春惊慌失措
    2020-12-28 11:39

    You can run jmap -histo which will show you loaded classes.

    For example:

    jmap -histo[:live] 
        to connect to running process and print histogram of java object heap
        if the "live" suboption is specified, only count live objects
    
    Example: jmap -dump:live,format=b,file=heap.bin 
    

    Another way is to enable classloading debug information and do some scripting to detect what is left loaded.

提交回复
热议问题