hi xu cheng, don't mention it. glad you've eventually solved your problem.
daniel --- daniel baktiar http://savinggaia.tritiumapps.com - saving the planet is everyone's business! 2010/11/23 xu cheng <xcheng....@gmail.com> > hi Daniel > thanks alot for replying. > > I don't know how to figure out how much the param MaxPermSize is set to. > may be it's set to be default. I just set the xmx and xms, so I thought that > the memory will absolutely enough, I didn't > notice this param, my fault. > > I did an experiment on tomcat , I just kept redeploying apps , and the perm > gen keep growing each time I deploy the same app. and when I undeploy the > app, the perm gen didn't clean the garbage > ( I think they are garbage, but I don't know whether the vm can figure it > out, I monitor this with the > jconsole in the jdk/bin). in the meanwhile , the code cache in the memory > pool and the loaded classes grow with the same curve like the permanent > generation. the unused class meta data wasn't cleaned up during each > deployment. > > I always redeploy the apps with shutting down the server, I think that > might be the point. > > by the way , this aritical help me a lot to understand it. > > http://blogs.sun.com/jonthecollector/entry/presenting_the_permanent_generation > > thanks again for helping > > 2010/11/23 Daniel Baktiar <dbakt...@gmail.com> > >> hi xu cheng, >> >> having a powerful machine with big memory is good. but don't assume that >> everything will be used automatically. >> the jvm doesn't automatically use all the resources in your memory when >> you >> start tomcat. you need to configure it. >> try to add something like this: >> *CATALINA_OPTS="-XX:MaxPermSize=512m" * >> inside your catalina.sh (linux/unix) or catalina.bat (windows). >> you can put this as the first line (after the comments, for example). >> >> try to run again and see whether you still have the same error(s). >> >> PermGen space is the permanent generational heap for storing data such as >> class data. you will bump into this when deploying a large application or >> deploying repetitively. you will still get the exception when deploying >> often, only less frequent. >> --- >> daniel baktiar >> http://savinggaia.tritiumapps.com - saving the planet is everyone's >> business! >> >> >> >> >> >