Ok, thanks for your answer.
In fact i had also change the other parameter (I haven't found any
information about this parameter on your website, maybe it will be good to
add something on it ?) :
xwiki.store.cache.pageexistcapacity (Which is in fact the maxNode for cache
xwiki.store.pageexistcache)
in xwiki.cfg.
I'm agree, maybe it will be easier to understanding if you remove
default-local.xml in fact.
Julien
Thomas Mortagne
<thomas.mortagne@
xwiki.com> A
Envoyé par : XWiki Developers <devs(a)xwiki.org>
devs-bounces@xwik cc
i.org
Objet
Re: [xwiki-devs] Question on
24/02/2010 14:28 JBossCache configuration and
EvictionPolicyConfig...
Veuillez répondre
à
XWiki Developers
<devs(a)xwiki.org>
On Wed, Feb 24, 2010 at 11:38, Julien Revert <jurevert(a)airfrance.fr> wrote:
Hi everyone,
Could you tell me if it's normal or if it's a bug; in fact i'm not sure.
I'm using jbosscache in local mode but attributes "timeToLiveSeconds" and
"maxNodes" in default-local.xml are not taken into account. It's
default.xml which is use.
It depends of the cache actually. Some caches are using "default" and
some others are using "default-local". Most of the caches are using
default.xml as default configuration. See
http://code.xwiki.org/xwiki/bin/view/Modules/CacheModule for more.
This goal was to separate caches we could want to synchronize between
several XWiki instances (default) and caches for which it's not useful
(default-local). But this distinction is not useful anymore since
clustering is not done using cache configuration anymore (as you
already know it ;)). We should probably remove the default-local
things and make all caches use default.xml as default configuration
file.
Now about maxNodes, if you are trying to set the document cache size
specifically, the best is probably to set the
xwiki.store.cache.capacity property in xwiki.cfg file.
Here are my configurations files :
xwiki.properties :
[...]
cache.cacheHint=jbosscache
cache.localCacheHint=jbosscache/local
[...]
default-local.xml :
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
name="jboss.cache:service=Cache">
<!-- Specific eviction policy configurations. This is LRU -->
<attribute name="EvictionPolicyConfig">
<config>
<attribute
name="wakeUpIntervalSeconds">5</attribute>
<attribute
name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
<!-- Cache wide default -->
<region name="/xwiki">
<!-- NOT TAKEN INTO ACCOUNT, BUG ? -->
<attribute name="maxNodes">5002</attribute>
<attribute
name="timeToLiveSeconds">21602</attribute>
</region>
</config>
</attribute>
</mbean>
</server>
default.xml :
<?xml version="1.0" encoding="UTF-8"?>
<server>
<!--
>
==================================================================== -->
<!-- Defines JBoss Cache configuration
> -->
<!--
>
==================================================================== -->
<!-- Note the value of the 'code'
attribute has changed since JBC
1.x
> -->
<mbean
code="org.jboss.cache.jmx.CacheJmxWrapper"
name="jboss.cache:service=Cache">
<!-- Specific eviction policy configurations. This is LRU -->
<attribute name="EvictionPolicyConfig">
<config>
<attribute
name="wakeUpIntervalSeconds">5</attribute>
<attribute
name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
<!-- Cache wide default -->
<region name="/xwiki">
<attribute name="maxNodes">5001</attribute>
<attribute
name="timeToLiveSeconds">21601</attribute>
</region>
</config>
</attribute>
</mbean>
</server>
In fact, the 'maxNodes' and 'timeToLiveSeconds' which are used are 5001
and
21601.
Is it normal ?
I would like adding that I'm trying to optimise my cache configuration
because we have error "java.lang.OutOfMemoryError: Java heap space" one
or
twice a week and we are suspecting a cache problem.
( Tomcat parameters used are : -Xms1024m -Xmx1048m -XX:MaxPermSize=128m
[...] )
We have many errors look like arround the OutofMemory :
08:47:45,880
[
http://wiki-soa.airfrance.fr/xwiki/bin/view/XWiki/MyTestClass] ERROR
aseEvictionAlgorithm Eviction
of /xwiki/wikidict:BlogToolbar.WebPreferences failed
java.lang.NullPointerException
at org.apache.log4j.Category.log(Category.java:849)
at org.apache.commons.logging.impl.Log4JLogger.trace
(Log4JLogger.java:152)
at
org.jboss.cache.factories.ComponentRegistry.invocationsAllowed
(ComponentRegistry.java:816)
at
org.jboss.cache.invocation.CacheInvocationDelegate.cacheStatusCheck
(CacheInvocationDelegate.java:582)
at org.jboss.cache.invocation.CacheInvocationDelegate.evict
(CacheInvocationDelegate.java:355)
at org.jboss.cache.eviction.BaseEvictionPolicy.evict
(BaseEvictionPolicy.java:27)
at
org.jboss.cache.eviction.BaseEvictionAlgorithm.evictCacheNode
(BaseEvictionAlgorithm.java:231)
at org.jboss.cache.eviction.LRUAlgorithm.evict
(LRUAlgorithm.java:92)
at org.jboss.cache.eviction.LRUAlgorithm.prune
(LRUAlgorithm.java:172)
at org.jboss.cache.eviction.BaseEvictionAlgorithm.process
(BaseEvictionAlgorithm.java:116)
at org.jboss.cache.eviction.EvictionTimerTask.handleRegion
(EvictionTimerTask.java:133)
at org.jboss.cache.eviction.EvictionTimerTask.processRegions
(EvictionTimerTask.java:118)
at org.jboss.cache.eviction.EvictionTimerTask.access$000
(EvictionTimerTask.java:28)
at org.jboss.cache.eviction.EvictionTimerTask$1.run
(EvictionTimerTask.java:106)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
But in fact I don't know if this error is a cause or a consequence of
this
OutOfMemoryError.
Thanks,
Julien
Accédez aux meilleurs tarifs Air France, gérez vos réservations et
enregistrez-vous en ligne sur
http://www.airfrance.com
Find best Air France fares, manage your reservations
and check in online
at
http://www.airfrance.com Les données et renseignements contenus dans
ce message peuvent être de nature confidentielle et soumis au secret
professionnel et sont destinés à l'usage exclusif du destinataire dont les
coordonnées figurent ci-dessus. Si vous recevez cette communication par
erreur, nous vous demandons de ne pas la copier, l'utiliser ou la
divulguer. Nous vous prions de notifier cette erreur à l'expéditeur et
d'effacer immédiatement cette communication de votre système. Société Air
France - Société anonyme au capital de 1 901 231 625 euros - RCS Bobigny
(France) 420 495 178 - 45, rue de Paris, 95 747 Roissy CDG CEDEX
The data and information contained in this message may
be confidential
and subject to professionnal secrecy and is intended for the exclusive use
of the recipient at the address shown above. If you receive this message by
mistake, we ask you not to copy, use or disclose it. Please notify this
error to the sender immediately and delete this message from your system.
Société Air France - Limited company with capital of 1,901,231,625 euros -
Bobigny register of companies (France) 420 495 178 - 45, rue de Paris, 95
747 Roissy CDG CEDEX Pensez à l'environnement avant d'imprimer ce message.
Think of the environment before printing this mail.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
Accédez aux meilleurs tarifs Air France, gérez vos réservations et enregistrez-vous en
ligne sur
http://www.airfrance.com
Find best Air France fares, manage your reservations and check in online at
http://www.airfrance.com Les données et renseignements contenus dans ce message peuvent
être de nature confidentielle et soumis au secret professionnel et sont destinés à
l'usage exclusif du destinataire dont les coordonnées figurent ci-dessus. Si vous
recevez cette communication par erreur, nous vous demandons de ne pas la copier,
l'utiliser ou la divulguer. Nous vous prions de notifier cette erreur à
l'expéditeur et d'effacer immédiatement cette communication de votre système.
Société Air France - Société anonyme au capital de 1 901 231 625 euros - RCS Bobigny
(France) 420 495 178 - 45, rue de Paris, 95 747 Roissy CDG CEDEX
The data and information contained in this message may be confidential and subject to
professionnal secrecy and is intended for the exclusive use of the recipient at the
address shown above. If you receive this message by mistake, we ask you not to copy, use
or disclose it. Please notify this error to the sender immediately and delete this message
from your system. Société Air France - Limited company with capital of 1,901,231,625 euros
- Bobigny register of companies (France) 420 495 178 - 45, rue de Paris, 95 747 Roissy CDG
CEDEX Pensez à l'environnement avant d'imprimer ce message.
Think of the environment before printing this mail.