jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Cooke <mpcoo...@lineone.net>
Subject Re: Remote Cache, issues
Date Tue, 19 Oct 2004 16:13:44 GMT
Another problem is occurring, sometimes a local put results in a call to
compositecache.update( ICacheElement ce ) which just blocks indefinitely 
before going into the inner update method.

I presume it is waiting for the synchronization lock on the 
compositecache object. I tried pausing every other thread in the system 
but could not see what other thread was holding the lock? Unfortunately 
my system does not support displaying monitors/deadlocks (possibly due 
to remote debugging or JVM version)

This is a guess but is it possible that the asynchronous pushing of 
objects from the remotecache is somehow ending up fighting over a 
synchronization lock with the the thread that does the local puts?

The update method is blocking maybe once in every 50,000 local puts (at 
a rough guess).

Matt.



Aaron Smuts wrote:
> Sounds like we created a bug in when we altered the queues.  I need to
> look into it.
> 
> Aaron
> 
> 
>>-----Original Message-----
>>From: Matthew Cooke [mailto:mpcooke3@lineone.net]
>>Sent: Monday, October 18, 2004 2:06 PM
>>To: Turbine JCS Users List
>>Subject: Remote Cache, issues
>>
>>I've replaced the version of JCS I was using with the version in CVS
>>HEAD in an attempt to get the RemoteCache push mode working.
>>First I tried changing RemoveUponRemotePut=true to false, and although
>>the master cache registered connections from client machiens the push
>>does not seem to work.
>>
>>I've dug around in the code with a debugger and and the queue objects
>>seem to attempt to destroy themselves quite aggressively.
>>
>>What seems to happen is that a queue is created on the "master" cache
>>for each client that connects, this is then rapidly destroyed which
>>means that the queue returns an isAlive() of false. Then when an item
> 
> is
> 
>>put into the "master" cache it fails to notify the client machines due
>>to the fact that it checks isAlive() on each queue object (and they
> 
> all
> 
>>return false).
>>
>>I tried removing the isAlive() check and this pretty much got the push
>>working, only whenever a new machine reconnects it triggers a method
>>designed to clean up dead queues this removes ALL queues, once again
> 
> due
> 
>>to the fact that they always return isAlive false after about 10
> 
> seconds
> 
>>of running.
>>
>>Given that queue's are so aggressively self destroying I wonder if it
>>was really isAlive() that was meant to be being called in the
>>queuecleanup method and in the method that returns a list of active
>>queues in preparation for the push. Was it maybe isWorking() rather
> 
> than
> 
>>isAlive() that should be called. isWorking() (i think) reports on
>>whether the underlying RMI connection has failed unlike the isAlive()
>>check.
>>
>>Have I somehow misconfigured JCS on the Master/Client machines? Is it
>>suppose to be actively settting the status of the queues to
> 
> destroy=true
> 
>>(isAlive()=false) every X seconds and if so how is the push mode
>>supposed to work?
>>
>>Below are the relevant sections from the remotecache.ccf (for the
>>'master' cache)
>>
>># Registry used to register and provide the
>># IRemoteCacheService service.
>>registry.host=localhost
>>registry.port=1099
>>
>><...snip...>
>>
>>jcs.region.objectCache=DC
>>
> 
> jcs.region.objectCache.cacheattributes=org.apache.jcs.engine.CompositeCa
> ch
> 
>>eAttributes
>>jcs.region.objectCache.cacheattributes.MaxObjects=5000
>>
> 
> jcs.region.objectCache.cacheattributes.MemoryCacheName=org.apache.jcs.en
> gi
> 
>>ne.memory.lru.LRUMemoryCache
>>jcs.region.objectCache.cacheattributes.UseMemoryShrinker=false
>>jcs.region.objectCache.cacheattributes.MaxMemoryIdleTimeSeconds=10
>>jcs.region.objectCache.cacheattributes.ShrinkerIntervalSeconds=60
>>
> 
> jcs.region.objectCache.elementattributes=org.apache.jcs.engine.ElementAt
> tr
> 
>>ibutes
>>jcs.region.objectCache.elementattributes.IsEternal=false
>>jcs.region.objectCache.elementattributes.MaxLifeSeconds=60000
>>jcs.region.objectCache.elementattributes.IsSpool=true
>>jcs.region.objectCache.elementattributes.IsRemote=true
>>jcs.region.objectCache.elementattributes.IsLateral=true
>>
>>
>>jcs.region.queryCache=DC
>>
> 
> jcs.region.queryCache.cacheattributes=org.apache.jcs.engine.CompositeCac
> he
> 
>>Attributes
>>jcs.region.queryCache.cacheattributes.MaxObjects=4000
>>
> 
> jcs.region.queryCache.cacheattributes.MemoryCacheName=org.apache.jcs.eng
> in
> 
>>e.memory.lru.LRUMemoryCache
>>jcs.region.queryCache.cacheattributes.UseMemoryShrinker=false
>>jcs.region.queryCache.cacheattributes.MaxMemoryIdleTimeSeconds=10
>>jcs.region.queryCache.cacheattributes.ShrinkerIntervalSeconds=60
>>
> 
> jcs.region.queryCache.elementattributes=org.apache.jcs.engine.ElementAtt
> ri
> 
>>butes
>>jcs.region.queryCache.elementattributes.IsEternal=false
>>jcs.region.queryCache.elementattributes.MaxLifeSeconds=60000
>>jcs.region.queryCache.elementattributes.IsSpool=true
>>jcs.region.queryCache.elementattributes.IsRemote=true
>>jcs.region.queryCache.elementattributes.IsLateral=true
>>
>>
>># Primary Disk Cache-- faster than the rest because of memory key
> 
> storage
> 
> jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF
> ac
> 
>>tory
>>
> 
> jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe
> dD
> 
>>iskCacheAttributes
>>jcs.auxiliary.DC.attributes.DiskPath=/usr/local/web/MasterJcsCache
>>
>>
>>and the relevant sections of cache.ccf for the 'client' machines
>>
>><...snip...>
>>jcs.region.objectCache=DC,RC
>>
> 
> jcs.region.objectCache.cacheattributes=org.apache.jcs.engine.CompositeCa
> ch
> 
>>eAttributes
>>jcs.region.objectCache.cacheattributes.MaxObjects=4000
>>
> 
> jcs.region.objectCache.cacheattributes.MemoryCacheName=org.apache.jcs.en
> gi
> 
>>ne.memory.lru.LRUMemoryCache
>>jcs.region.objectCache.cacheattributes.UseMemoryShrinker=false
>>jcs.region.objectCache.cacheattributes.MaxMemoryIdleTimeSeconds=10
>>jcs.region.objectCache.cacheattributes.ShrinkerIntervalSeconds=60
>>
> 
> jcs.region.objectCache.elementattributes=org.apache.jcs.engine.ElementAt
> tr
> 
>>ibutes
>>jcs.region.objectCache.elementattributes.IsEternal=false
>>jcs.region.objectCache.elementattributes.MaxLifeSeconds=259200
>>jcs.region.objectCache.elementattributes.IsSpool=true
>>jcs.region.objectCache.elementattributes.IsRemote=true
>>jcs.region.objectCache.elementattributes.IsLateral=true
>>
>># Disk Cache used as an overflow cache when the main memory cache is
> 
> full.
> 
> jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF
> ac
> 
>>tory
>>
> 
> jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe
> dD
> 
>>iskCacheAttributes
>>jcs.auxiliary.DC.attributes.DiskPath=/usr/local/web/jcscache
>>
>>
>># This is an RMI based remote cache.
>>jcs.auxiliary.RC=org.apache.jcs.auxiliary.remote.RemoteCacheFactory
>>
> 
> jcs.auxiliary.RC.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheA
> tt
> 
>>ributes
>>jcs.auxiliary.RC.attributes.RemoteHost=builder
>>jcs.auxiliary.RC.attributes.RemotePort=1099
>>jcs.auxiliary.RC.attributes.LocalPort=1103
>>jcs.auxiliary.RC.attributes.RemoveUponRemotePut=false
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail:
> 
> turbine-jcs-user-unsubscribe@jakarta.apache.org
> 
>>For additional commands, e-mail:
> 
> turbine-jcs-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org


Mime
View raw message