tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Miehs <and...@2sheds.de>
Subject Re: Recovery from OutOfMemoryError?
Date Wed, 01 Aug 2007 13:55:17 GMT
On 01/08/2007, at 3:44 PM, Christopher Schultz wrote:

>
> I'm guessing he's running a webapp, and that one of the request worker
> threads got an OOME. Most webapp requests are idempotent (or should  
> be),
> and those that aren't are generally wrapped around database or other
> transactions. Assuming I'm right (which is frequently dangerous), one
> failed request should not affect the rest of the application. Any
> locally-instantiated objects should be ripe for collection, including
> any of the "big ones" that probably caused the OOME in the first  
> place.
> The server should keep going, right?
>

It sounds as if the original poster doesn't really have much to say
about how the thing is programmed, and is trying to find a solution
to his problem, which is being called at 3am.

Swatch keeping its eyes on catalina.out and then calling killall -9  
java,
./bin/startup.sh should solve this.

As for the rest of the memory issues - Catching OOM doesn't help you
really, as Tomcat does not catch OOM - it throws it all the way up to
the top, at which stage the JVM dies.

IE: Your thread uses all the memory - tomcat now receives a new request,
tries to allocate memory for a new object - poof. Even though your code
deals nicely with the OOM situation, tomcat doesn't.

Cheers

Andrew

PS: I can't wait for the day where Java gets pointers and the sizeof
operator... <smile>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message