cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Couvreur <mcouvr...@be-value.nl>
Subject Caching a lot of large files problems
Date Fri, 01 Dec 2006 09:04:29 GMT
Hi!
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"/>
</map:transform>


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


<store logger="core.store">
	<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"/>
</store>

And the following settings are in core.properties (the more memory I give, the
longer it takes before the memory error, but memory is at some point limited off
course):
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">
  <Arg>
    <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>
    </New>
  </Arg>
</Call>

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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message