Antonio Gallardo wrote:
Johannes Schaefer wrote:

Antonio Gallardo schrieb:
Johannes Schaefer wrote:

Johannes Schaefer schrieb:


Hi!

I get an out-of-memory error for movies above a certain size
(around 10MB):
15:18:41.906 WARN!! Error for .../movs/madagascar.mov
java.lang.OutOfMemoryError: Java heap space

OK,
here's steps 1 to 3 to "solve" this problem

1. set <parameter name="heapsize" value="512000000"/>
 in cocoon.xconf
2. set JAVA_OPTIONS="-Xmx256m"

Now we can have bigger movies in our app.



Smaller movies don't make problems.

How can I increase the heap size for Cocoon?


If it is caching: Can I turn caching off only for the *.mov
matcher?
<map:match pattern="**.mov">
  <map:read src="{0}" mime-type="video/quicktime"/>
</map:match>

3. put the *mov match into a noncachable pipeline.

Now we can have more movies in our app.

Can I improve on this?



<!--+
        | Resource reader has these configuration parameters:
    <expires>-1</expires>
    <quick-modified-test>false</quick-modified-test>
    <byte-ranges>true</byte-ranges>
    <buffer-size>8192</buffer-size>
        +-->

Pay special attention to the buffer. There is no need to increase the
JVM memory.


Don't get it.
I tried the above and let the Java heap alone (no -Xmx setting).
Tried it inside a cachable and a noncachable pipeline.
Tried increasing buffer-size.


No results:
 java.exe (I'm on WinXP) keeps eating up memory and at
 a certain point I get the OutOfMem error.
Just to be sure: You need to put the parameters in the reader definition. Not in the pipeline.

I'm OK with the solution we have (for now), just thought
there might be something more reasonable.
Maybe is not the reader the problem.
If he requests the moves with byte ranges it may be - when requesting a particular byte range it is cached in memory before serializing to client - I realized that after studying the code. This is not the most efficient approach there is.

--
Leszek Gawron                                      [EMAIL PROTECTED]
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to