wood burning stoves 2.0*
The moose likes Tomcat and the fly likes tomcat - their classes from previous runs are still loaded in memory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat - their classes from previous runs are still loaded in memory" Watch "tomcat - their classes from previous runs are still loaded in memory" New topic
Author

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

amir taghvayi
Ranch Hand

Joined: Sep 16, 2011
Posts: 54
hi

when stop my project , tomcat say :

The following web applications were stopped (reloaded, undeployed), but their classes from previous runs are still
loaded in memory, thus causing a memory leak (use a profiler to confirm) .

Where we find that Which classes are left in memory ?

please help me .
ali farozi
Greenhorn

Joined: May 23, 2012
Posts: 6
hi amir

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

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

Joined: Sep 16, 2011
Posts: 54
hi ali

jmap help is :jmap -histo <pid> .

what is <pid> ? what is jmap command line for web-app in tomcat ?

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Please keep an eye on this thread.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
ahsan hemati
Greenhorn

Joined: May 27, 2012
Posts: 2
hi

Do the following steps:
1- get pid with jps command for example -->  pid: 2512 org.apache.catalina.startup.Bootstrap start
2- run jmap -histo 2512

show the classes remain in memory . and you can use of jconsole for tracing your project .
amir taghvayi
Ranch Hand

Joined: Sep 16, 2011
Posts: 54
thank you , i get list of classes are still loaded in memory .

Why my class remain in memory ?What is the problem of class ?
 
GeeCON Prague 2014
 
subject: tomcat - their classes from previous runs are still loaded in memory