Hello Diogo,

First of all, here are some things described about the StoreJanitor: 
http://cocoon.apache.org/2.1/userdocs/concepts/storejanitor.html

I normally prefer to set freememory low, like to 2 Mb. I think, your setting 
could easily lead to your described behavior. It has two implications like you 
have it now:

1) when the jvm is just perfectly happy, it might have some extra memory in use 
which will be cleared upon the next garbage collection. If, however, the 
StoreJanitor thread would come by before the garbage collection, it might 
decide to clear cache entries, while the jvm would have cleared enough memory

2) Now, suppose, you jvm is critical on memory (it cannot free enough anymore 
(there are very many reasons why this could occur)). According your settings, 
if memory useage is larger then heapsize and free memory is lower then 
freememory, the StoreJanitor will remove entries from cache. This is cocoon's 
used mechanism to clear cache entries when low on memory. IMO, when you need 
your store janitor to remove cache entries, you end up having problems. It 
removes randomly from your stores entries, it removes cached xsls, etc etc. My 
experience is, that my app actually seems to go worse, when the StoreJanitor is 
trying to save the app. 

So, if in your case, the Store Janitor does remove entries, you might want to 
reconfigure your store settings to prevent the store janitor removing cache 
entries (if your low on memory results from to many cached entries in the first 
place...there are other places where the problem might be, but the Store 
Janitor will clear your caches anyway, troubling your app even more). So, can 
you tell me what your <store> conf is? You might want to reduce your 
maxobjects, and set time2idle to have the cache remove entries. There is though 
much to know about this (how the caching works, and how to tune it)

Ard


I'm having problems configuring the memory allocation for the Store Janitor.

if we have something like:

<store-janitor logger="core.store.janitor">
   <parameter name="freememory" value="104857600"/>  
   <parameter name="heapsize" value="515396075"/> <!-- ~ 96% of 512 MB -->
<store-janitor logger="core.store.janitor">

And the JVM is:
 -Xms512m -Xmx512m

Does this mean that that the JVM will always have 104857600 available? What 
does the JVM with that amount of memory?


I've put cocoon in DEBUG mode and I'm seeing too many messages "Memory is low!" 
which is causing elements to be removed from cache. How can improve this? 
1. Decrease the freememory value?
2. Decrease the heapsize value?
3. Should the value of freememory + heapsize be smaller that the JVM value? 

What's the freememory used by anyway? I know that this is for the JVM, but 
should this be changed according to the amount of memory that cocoon needs to 
run? 

Please let me know what you think of

Many Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to