cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Couvreur <>
Subject Caching a lot of large files problems
Date Fri, 01 Dec 2006 09:04:29 GMT
Please help me with the following problem, cause everything I try doesn't work.

We want to cache large xml-documents every night from an exist-database with
cocoon 2.1.9. Those files are about 600K each and we want to store them on
harddisk. The problem is that while genereating the cache, java runs out of
memory, depending on how much memory java has. It gives an error:
java.lang.OutOfMemoryError: Java heap space.
I would think that if memory is full, things should automatically be cleared
from cache in memory. But that doens't seem te happen. I've tried several
settings for java-memory but that all doesn't make a difference. 

This is the code in the sitemap for creating the cache:

<map:transform type="cinclude">
  <map:parameter name="source" value="d:/cache-dir"/> 
  <map:parameter name="support-caching" value="true"/>
  <map:parameter name="expires" value="172800"/>

The cocoon.xconf has the following settings:
<transient-store logger="">
  <parameter name="maxobjects" value="1000"/>
  <parameter name="use-persistent-cache" value="false"/>

<store logger="">
	<parameter name="maxobjects" value="1000"/>
	<parameter name="eternal" value="false"/>
	<parameter name="timeToLiveSeconds" value="0"/>
	<!-- 1 day -->
	<parameter name="timeToIdleSeconds" value="86400"/>
	<parameter name="overflow-to-disk" value="true"/>
	<parameter name="diskpersistent" value="true"/>
	<parameter name="use-persistent-cache" value="true"/>

And the following settings are in (the more memory I give, the
longer it takes before the memory error, but memory is at some point limited off
store-janitor.freememory =  2000000
store-janitor.heapsize =   200000000
store-janitor.cleanup-thread-interval = 3
store-janitor.percent-to-free = 10

I've also tried to change the jetty-settings, with no luck:
<Call name="addListener">
    <New class="org.mortbay.http.SocketListener">
      <Set name="Port"><SystemProperty name="jetty.port" default="8888"/></Set>
      <Set name="MinThreads">10</Set>
      <Set name="MaxThreads">100</Set>
      <Set name="MaxIdleTimeMs">30000</Set>
      <Set name="LowResourcePersistTimeMs">5000</Set>
      <Set name="bufferSize">8192</Set>

EHcache is updated to ehcache-1.2.3.jar.

I hope someone can give some thoughts about were to look.

Regards, Maarten Couvreur

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message