On Fri, 2003-10-17 at 00:24, Alexander Schatten wrote:
> Already in Cocoon 2.0x there were severe problems with large downloads.
> Using a statement like:
>
>
> <map:match pattern="downloads/**.gz">
> <map:read mime-type="application/x-gzip"
> src="downloads/{1}.gz"/>
> </map:match>
>
>
> basically worked with files below approx. 16MB. Files with sizes above,
> were terminated at 16MB.
>
> not good.
>
> I hoped, that this is corrected in 2.1 unfortunately it seems to have a
> similar behaviour: I tried a file with about 24MB and the resulting
> downlad had 0 bytes...
>
> Does anyone have an idea how to solve this problem?
I heard such claims before so I wanted to see it for myself. I simply
added a map:read to a default Cocoon 2.1 sitemap to read a ~70 MB file.
Open a browser and surf to the correct URL... my computer slows down
completely, I don't get anything in my browser, so I just abort jetty
before it gets out of hand.
Then I tried putting the map:read in a pipeline like this:
<map:pipeline type="noncaching">
<map:parameter name="outputBufferSize" value="8192"/>
<map:match pattern="test.xyz">
<map:read src="/home/bruno/tmp/sylvain.avi"/>
</map:match>
</map:pipeline>
Two important things here:
* I used the non-caching pipeline
* I disabled complete output-buffering by specifying an
outputBufferSize parameter with a reasonable value
which saves me about 140 MB of otherwise useless wasted RAM, and now it
works like a charm.
Let me know if this also helps for you.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED] [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]