java - Spring MVC on Tomcat PermGen Space increase constantly -
i have web app built on top of springmvc 3.2 , running on tomcat. use visualvm monitor permgen space , found increase constantly:
i take 3 heap dump , run "classloader loaded classes histo" analysis , found these results:
the 9:44pm dump:
loader:org.springframework.instrument.classloading.tomcat.tomcatinstrumentableclassloader#1, count:3285
the 9:55pm dump:
loader:org.springframework.instrument.classloading.tomcat.tomcatinstrumentableclassloader#1, count:3286
the 7:40am dump:
loader:org.springframework.instrument.classloading.tomcat.tomcatinstrumentableclassloader#1, count:3855
my app quite during period. looks number of classes been loaded increasing constantly. want understand classes newly loaded across these heap dump. running "classloader loaded classes" doesn't give me information buried these kind of information:
anyone has experience on analysing kind of issue?
update jvm info
jvm: java hotspot(tm) 64-bit server vm (20.45-b01, mixed mode) java: version 1.6.0_45, vendor sun microsystems inc.
jvm args:
-dvisualvm.id=4226015013703 -xdebug -xrunjdwp:transport=dt_shmem,address=javadebug,suspend=y,server=n -dvisualvm.id=4214057282541 -denv=dev-no-mas -dorg.slf4j.simplelogger.defaultloglevel=debug -dssgateway.disabled=true -dcom.sun.management.jmxremote= -dcom.sun.management.jmxremote.port=1299 -dcom.sun.management.jmxremote.ssl=false -dcom.sun.management.jmxremote.authenticate=false -djava.rmi.server.hostname=127.0.0.1 -djava.util.logging.config.file=c:\users\luog.ikari\.intellijidea13\system\tomcat\unnamed_rythm_2\conf\logging.properties -djava.util.logging.manager=org.apache.juli.classloaderlogmanager -djava.endorsed.dirs=c:\l\j\apache-tomcat-6.0.29\endorsed -dcatalina.base=c:\users\luog.ikari\.intellijidea13\system\tomcat\unnamed_rythm_2 -dcatalina.home=c:\l\j\apache-tomcat-6.0.29 -djava.io.tmpdir=c:\l\j\apache-tomcat-6.0.29\temp
- permgen heap should hold system object, heap application object regular heap space..
the general issue every class hold reference class definition , every class loader created him, , every classloader hold reference classes created. when garbage collector moving on objects, because have reference keep growing.. , gc not release them. in example use :
${java_home}/bin/jvisualvm
which tool can you, solution long , link provide images.. tool can find classloader cause leak(class loader every application under server in order ley several applications run toghther under same server)
than go find problem class.. once know causing problem able cure it..
this link exaplain why happening , how deal:
cdivilly.wordpress.com/2012/04/23/permgen-memory-leak/
you can read great presentation .. page 11 can see how can identify leaks , solutions.. very useful http://people.apache.org/~markt/presentations/2010-11-04-memory-leaks-60mins.pdf
hope more helpful
Comments
Post a Comment