[
https://issues.apache.org/jira/browse/COCOON-2168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577373#action_12577373
]
Felix Knecht commented on COCOON-2168:
--------------------------------------
After all it turned out that it's a problem of configuration. Thanks to Carsten.
Last snippet of the mail thread thread
http://marc.info/?t=120473411300003&r=1&w=2
<map:pipeline id="test-nocache" type="noncaching">
<map:parameter name="outputBufferSize" value="0" />
<map:match pattern="nocache">
<map:read src="/home/felix/tmp/livecd-i686-installer-2007.0.iso" >
<map:parameter name="buffer-size" value="8192" />
</map:read>
</map:match>
</map:pipeline>
The output buffer only specifies the size of the buffer for writing the
response. This is not directly related to caching. You might increase
performance by buffering.
The buffer is in both case unlimited because of allowing proper error handling.
If we don't have it yet, we should add these things to a "tuning cocoon" page.
I would turn off infinite buffering in production in all case and set a fixed
buffer size (like 8192). For reader pipelines I would turn off buffering
completly.
> ResourceReader produces Java Heap Overflow when reading a huge resource
> -----------------------------------------------------------------------
>
> Key: COCOON-2168
> URL: https://issues.apache.org/jira/browse/COCOON-2168
> Project: Cocoon
> Issue Type: Bug
> Components: * Cocoon Core
> Affects Versions: 2.2-dev (Current SVN)
> Reporter: Felix Knecht
> Attachments: ResourceReader.diff, test-case.tar.gz
>
>
> When reading a huge resource (i.e. 700MB file) the ResourceReader produces an
> overflow due to the BufferedOutputStream which is used (and forced to be used
> via AbstractReader). The BufferedOutputStream flushes only at the end (or
> when forced to), but overwrites the flush method to do nothing.
> As I don't know exactly where the BufferedOutputStream is used and what kind
> of impacts it will have to change it there I'm just going to fix the
> ResourceReader.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.