I'm getting an OOME in org.apache.cocoon.components.source.impl.SitemapSource.java, using cocoon 2.1.11. The getInputStream method uses a ByteArrayOutputStream.toByteArray method to create a new inputstream in memory.
This method is not very memory efficient. Come to think of it, using this method also limits the size of the inputstream to the available amount of memory.
What can I do to overcome this memory problem?