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!
>
>
>
>
> 2010/11/22 xu cheng <xcheng....@gmail.com>
>
> > after tracing the app with jprofiler for several hours , I still cannot
> > figure the problem.
> > it seems that the app doesn't use  a lot of memory.
> > and it still run pretty well in my computer.and after it is deployed in
> the
> > server, it crash....
> > the problem of the environment? but the tomcat on the server has been
> > running for a really long time with out any problem....
> > what's the point?.oh no   (°ο°)
> >
> > 2010/11/22 xu cheng <xcheng....@gmail.com>
> >
> > > by the way,
> > > it doesn't throws this exception while running on my computer
> > > it is only when the app is deploy on another computer that this problem
> > > occur
> > >
> > > 2010/11/22 xu cheng <xcheng....@gmail.com>
> > >
> > > hi:
> > >> thanks for replying
> > >> the app is running on a powerful server and the memory is suppose to
> be
> > >> enough
> > >> I'll check if there is a memory leak,(althouth the app is suppose to
> use
> > >> only a few memory)
> > >> thanks
> > >>
> > >> 2010/11/22 Caldarale, Charles R <chuck.caldar...@unisys.com>
> > >>
> > >> > From: xu cheng [mailto:xcheng....@gmail.com]
> > >>> > Subject: OutOfMemoryError some time on some tomcat!!!!1
> > >>>
> > >>> > the app works pretty well on my pc, and the tomcat
> > >>> > is apache-tomcat-6.0.29
> > >>> > however , when I put this app on to another computer
> > >>> > with the same tomcat it throws this exception
> > >>> > Java HotSpot(TM) 64-Bit Server VM warning: Exception
> > >>> > java.lang.OutOfMemoryError
> > >>>
> > >>> > Exception in thread "http-8080-24"
> > >>> > java.lang.OutOfMemoryError: PermGen space
> > >>>
> > >>> 64-bit JVMs often require larger heap sizes than 32-bit ones.  If the
> > >>> error occurs on the first deployment of the app, you may just need to
> > >>> configure a larger PermGen.  However, if this error occurs only after
> > >>> redeploying your app some number of times, you likely have a memory
> > leak.
> > >>>  Use any of the widely available profilers or heap analysis tools to
> > see
> > >>> just what is consuming memory.  You can get some pointers here:
> > >>>
> > >>> http://wiki.apache.org/tomcat/FAQ/Memory
> > >>>
> > >>>  - Chuck
> > >>>
> > >>>
> > >>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
> > PROPRIETARY
> > >>> MATERIAL and is thus for use only by the intended recipient. If you
> > received
> > >>> this in error, please contact the sender and delete the e-mail and
> its
> > >>> attachments from all computers.
> > >>>
> > >>>
> > >>> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > >>> For additional commands, e-mail: users-h...@tomcat.apache.org
> > >>>
> > >>>
> > >>
> > >
> >
>

Reply via email to