> From: Christopher Schultz [mailto:[EMAIL PROTECTED] > Subject: Re: OutOfMemoryError (but not really out of memory?) > cause tomcatprocesses to hang > > Sharon French wrote: > > Is it possible that the initial OutOfMemory error occurs > > when a large garbage collection is taking place and an > > OutOfMemoryError is thrown before the memory can be reclaimed > > Yes. In fact, this is often when OOMs occur, since the JVM is trying > hard to avoid the OOM in the first place.
Uhhh - no. The JVM will not return an OOME until the GC is completely finished and the request still cannot be satisfied. Even with concurrent GC, failing allocation requests are suspended until a full GC has completed. The exception to the above is if a request is made that could never be satisfied; that will be given an OOME immediately. > After an OOM is thrown, the JVM is basically completely hosed. Definitely not true. The JVM is still functional, although the app (Tomcat, in this case) may not be able to proceed. > > If so, how do we combat this behavior? > > Fix resource leaks, allocate an appropriate amount of memory, > and limit resource use to avoid OOMs in the first place. Very good advice. If you can, use a profiler to find out what (and who) is consuming the heap. However, the 64m given to the PermGen is rather small for an app server, given the number of classes that must be loaded; for that matter, the 256m for the whole heap is pretty tiny these days. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]