cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Sheppard <>
Subject Cocoon protocol memory leak
Date Wed, 13 May 2009 15:40:59 GMT
We have a sitemap where a calls b, which calls c, which calls d (see below).
The reason it's set up like this is so we can view each stage on its own, to
facilitate development and debugging.

We were noticing massive memory leakage. If the a/*/* pipeline was hit 200
times, the memory usage would shoot up to 200Mb and never come down, even
after garbage collection had run.

After we replaced all the Œcocoon:¹ protocol calls with
'http://localhost/path/to/cocoon', the memory leak disappeared. No matter
how many times or how fast the pipeline was hit, memory usage would always
come down just before it reached 100Mb. It would stabilise at around 40-50Mb
after garbage collection. We only made that one change to the sitemap.

But we'd really like to use the cocoon: protocol, so that the error stack is
followed properly upon errors (among other reasons). When using the
'localhost' method, the stack trace stops at the last URL accessed.

Has anyone encountered an issue like this memory leak, or knows of a

We are using Cocoon 2.2 under JBoss 4.2.2 on 64-bit Linux.
Original sitemap follows. Filenames, etc. have been changed.

<map:match pattern="a/*/*">
    <map:generate src="cocoon:/b/{1}/{2}" />
    <map:transform src="r/x.xsl" type="saxon" />
    <map:serialize type="xml" />

<map:match pattern="b/*/*">
    <map:generate src="cocoon:/c/{1}/{2}" />
    <map:transform type="sql">
        <map:parameter name="use-connection" value="r" />
    <map:serialize type="xml" />

<map:match pattern="c/*/*">
    <map:act type="request">
        <map:parameter name="parameters" value="true"/>
        <map:generate src="cocoon:/d/{../1}" />
        <map:transform src="r/y.xsl" type="saxon"/>
        <map:transform type="cinclude" />
        <map:transform src="r/z.xsl" type="saxon"/>
    <map:serialize type="xml" />

<map:match pattern="d/*">
    <map:generate src="r/t.xml" />
    <map:transform src="r/s.xsl" type="saxon">
        <map:parameter name="resource" value="{1}" />
    <map:serialize type="xml" />

This e-mail (and any attachments) is confidential and may contain personal views which are
not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify
the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.

View raw message