cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: [#COCOON-2168] ResourceReader produces Java Heap Overflow when reading a huge resource - ASF JIRA
Date Tue, 11 Mar 2008 12:00:04 GMT
On 11.03.2008 04:48, Carsten Ziegeler wrote:

>>> We could argue about another default value than -1 though. Something 
>>> like 1024^2.
>> What do others think? Shall we change the default value from "buffer 
>> everything" (which lead to the OutOfMemoryError [1]) to something more 
>> "secure" in the sense of avoiding a potential source of error? Besides 
>> mentioning it on the changes page we have to set it to a value that's 
>> unlikely to be hit with a normal web application to change user 
>> application's behavior only in extreme cases. That's why I suggested 1MB.
> Hmm, not sure if we should change the default value. The idea of this 
> default was to be sure that error handling works out of the box. If you 
> have special cases like mentioned in the bug, it makes imho more sense 
> to fine tune these special cases (for instance by not buffering).

But I fear hardly anybody is aware or even uses the feature.

> The output buffer value is one of the settings which is "optimized" for 
> development and it should be tweaked for production usage.

It's not really development, is it? I mean even if you can not reset 
output buffer completely, you will still get the error markup appended 
and I would not care for development about how this looks :)

Being aware of the potential change in behavior I also chose a quite 
huge buffer of 1 MB so that hardly anybody should be affected. We can 
also discuss about making it even bigger like 10 MB. But I consider a 
buffer that's flushed too early once in a while better than an OOME in 
the default setup. And people can still change it to -1 and endless 
buffering if they really need. But at least they are aware of the 
effects then.


View raw message