cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <>
Subject Re: Large xml's in cocoon
Date Fri, 28 May 2004 15:49:48 GMT
On 28 May 2004, at 15:34, Ugo Cei wrote:

> Stefano Mazzocchi wrote:
>> what if I'm using jetty?
> I don't know. We're currently using the bundled Jetty for development 
> and Tomcat for staging/production. But my point still remains: it's 
> better to crash and burn rather than try to survive if you get an 
> OOMException.

Yeah, the problem is that you never "crash and burn" on OOMEs. The JVM 
doesn't itself exit.

You could (for instance) do something like:

try {
} catch (OutOfMemoryError e) {

I've seen a lot of OOMEs happening just because the machine was simply 
overloaded, and in those situation doing a System.exit() was more 
harmful than simply letting that thread die.

When a thread (a request thread, for instance) dies because of an OOME, 
is _definitely_ going to free up a couple of objects, and having the 
JVM that bit of millisecond to re-sort itself out and clean up some 
memory after thread death...

Oh, on a side note, Ugo, I'd seriously switch your 
development/production environments... I'm not going into performance 
details (I don't want to raise a can of worms), but at least on my 
tests Tomcat is using 3x the memory that Jetty is using per single 
request, so it's more likely for you to have OOMEs on Tomcat rather 
than Jetty.


View raw message