cocoon-users mailing list archives

Hello,
In general the system works fine, but when I'm serving large (not huge)
files I run into an OutOfMemoryException. The pipeline loads some data
from a database. Language translation. Some further transformations
corrects or extends the xml structure. Transformation to xsl-fo.
Serialization to pdf.
<map:match pattern="reports/**/report.pdf">
<map:generate type="serverpages"
src="reports/{1}/report.xsp"/>
<map:transform type="i18n">
<map:parameter name="locale"
value="{session-context:authentication/authentication/locale}"/>
</map:transform>
<map:transform src="stylesheets/general_fixes.xsl"/>
<map:transform src="stylesheets/table_fixes.xsl"/>
<map:transform src="stylesheets/doc2pdf.xsl"/>
<!--
This stylesheet makes image URLs absolute, so
that FOP can display
images. {realpath:/} returns the absolute path
of the context root.
-->
<map:transform src="stylesheets/pdf_imagelinks.xsl"
label="source">
<map:parameter name="ctxroot"
value="{realpath:/}"/>
<map:parameter name="dir"
value="/sibach/protected/resources/"/>
</map:transform>
<map:serialize type="fo2pdf"/>
</map:match>
I'm using similar pipelines for HTML, XLS and PS.
But when the result becomes larger the system runs into an exception:
- Servlet.service() for servlet Cocoon threw exception
java.lang.OutOfMemoryError: Java heap space
The problem occurs just before data is sent to the browser. In case of
html I can render more data. But I think it is because of the output in
HTML is less than the output for pdf. Limiting outputBufferSize it stops
at an amount of about 4.5MB. For PDF the message header is sent to the
browser. At least the PDF Reader starts. At the same moment the
exception occurs.
As it was mentioned earlier there are several possibilities to tune the
system. So I tried one after the other and all together, but not
success.
I changed all my pipelines to noncaching
sitemap.xmap
------------
<map:pipeline type="noncaching">
<map:parameter name="outputBufferSize" value="4096"/>
...
I increased the heap size
cocoon.xconf
------------
<parameter name="heapsize" value="512000000"/>
And changed the JAVA_OPTIONS
Environment Variable
--------------------
set JAVA_OPTIONS="-Xmx256m"
I also tried to change the initial memory pool, and maximum memory pool
Initial Memory Tomcat
---------------------
initial memory pool 128
maximum memory pool 256
But nothing happened
Environment:
- Windows XP SP2 512MB
- Apache Tomcat / 5.5.7
- C:\Programme\Java\jre1.5.0_04\bin\client\jvm.dll
- Cocoon 2.1.7 full build
Thanks
Urs Iwert
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org