jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garth Patil" <garthpa...@hotmail.com>
Subject RE: java.lang.InterruptedException on dispose()
Date Mon, 22 Aug 2005 20:33:13 GMT
another observation, and more of a trace. in the instances where dispose() 
throws the interrupted exception, these three lines show keyHash.size()=0, 
oldData.length() = 0, and newData.length() = 0, whereas when it doesn't 
throw an exception (and exits after writing the cache to disk correctly), 
each of these has nonzero values.

446252 [Thread-41] INFO  
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache  - Optomizing file 
keyHash.size()=0
446253 [Thread-41] INFO  
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache  - someCache -- 
oldData.length() = 0
446253 [Thread-41] INFO  
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache  - someCache -- 
newData.length() = 0

here is the log after i call dispose() to where the exception occurs:

446131 [http-9602-Processor24] INFO  
com.smslocate.container.cache.CacheManager  - Disposing cache: Region Name = 
someCache
HitCountRam = 3
HitCountAux = 0
---------------------------LRU Memory Cache
List Size = 1
Map Size = 1
Put Count = 1
Hit Count = 3
Miss Count = 1
---------------------------Indexed Disk Cache
Is Alive = true
Key Map Size = 0
Data File Length = 0
Optimize Opertaion Count = 0
Times Optimized = 0
Recycle Count = 0
Purgatory Hits = 0
Purgatory Size = 0
Working = true
Alive = false
Empty = true
Size = 0
446131 [http-9602-Processor24] INFO  
org.apache.jcs.engine.control.CompositeCache  - In dispose, someCache 
memCache.size = 1
446132 [http-9602-Processor24] INFO  org.apache.jcs.engine.CacheEventQueue  
- Cache event queue created: CacheEventQueue [listenerId=-539828617, 
cacheName=someCache]
446132 [http-9602-Processor24] INFO  
org.apache.jcs.engine.control.CompositeCache  - In dispose, someCache put 1 
into auxiliary 
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache@158d21e
446251 [Thread-40] INFO  org.apache.jcs.auxiliary.disk.AbstractDiskCache  - 
No longer waiting for event queue to finish: Cache Event Queue
Working = true
Alive = true
Empty = true
Size = 0
446251 [http-9602-Processor24] INFO  
org.apache.jcs.auxiliary.disk.AbstractDiskCache  - In dispose, destroying 
event queue.
446251 [http-9602-Processor24] INFO  org.apache.jcs.engine.CacheEventQueue  
- Destroying queue, stats =  Cache Event Queue
Working = true
Alive = false
Empty = true
Size = 0
446252 [http-9602-Processor24] INFO  org.apache.jcs.engine.CacheEventQueue  
- Cache event queue destroyed: CacheEventQueue [listenerId=-539828617, 
cacheName=someCache]
446252 [Thread-41] INFO  
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache  - Optomizing file 
keyHash.size()=0
446253 [Thread-41] INFO  
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache  - someCache -- 
oldData.length() = 0
446253 [Thread-41] INFO  
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache  - someCache -- 
newData.length() = 0
446253 [Thread-41] INFO  
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache  -  rename success = 
true
446253 [Thread-41] INFO  
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache  - 1 
dataFile.length() 0
446253 [Thread-41] WARN  org.apache.jcs.auxiliary.disk.indexed.IndexedDisk  
- Resetting data file
446253 [Thread-41] WARN  org.apache.jcs.auxiliary.disk.indexed.IndexedDisk  
- Resetting data file
446254 [Thread-41] WARN  
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache  - Closing files, 
base filename: someCache
446254 [http-9602-Processor24] INFO  
org.apache.jcs.engine.control.CompositeCache  - In dispose, someCache 
disposing of memory cache.
446254 [http-9602-Processor24] INFO  
org.apache.jcs.engine.memory.AbstractMemoryCache  - Memory Cache dispose 
called.  Shutting down shrinker thread if it is running.
446254 [http-9602-Processor24] WARN  
org.apache.jcs.engine.control.CompositeCache  - Called close for someCache
446260 [CacheEventQueue.QProcessor-teamCache] ERROR 
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache  - Failure updating 
element, cacheName: someCache, key: someKey
java.lang.InterruptedException
        at 
EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock.acquire(Unknown

Source)
        at 
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doUpdate(IndexedDiskCache.java:356)
        at 
org.apache.jcs.auxiliary.disk.AbstractDiskCache$MyCacheListener.handlePut(AbstractDiskCache.java:548)
        at 
org.apache.jcs.engine.CacheEventQueue$PutEvent.doRun(CacheEventQueue.java:652)
        at 
org.apache.jcs.engine.CacheEventQueue$AbstractCacheEvent.run(CacheEventQueue.java:567)
        at 
org.apache.jcs.engine.CacheEventQueue$QProcessor.run(CacheEventQueue.java:537)
446260 [CacheEventQueue.QProcessor-teamCache] INFO  
org.apache.jcs.engine.CacheEventQueue  - QProcessor exiting for 
CacheEventQueue [listenerId=-539828617, cacheName=someCache]



>From: "Garth Patil" <garthpatil@hotmail.com>
>Reply-To: "JCS Users List" <jcs-users@jakarta.apache.org>
>To: jcs-users@jakarta.apache.org
>Subject: RE: java.lang.InterruptedException on dispose()
>Date: Mon, 22 Aug 2005 20:22:48 +0000
>
>sorry. spoke too soon. still getting it on some caches. and the exception 
>comes right away after i call dispose(), so i'm thinking it's not the 
>amount of time, but something else interrupting the disposal.
>is this related to the 
>AbstractDiskCache$MyCacheListener.handlePut(AbstractDiskCache.java:548) 
>that's being called at the same time as dispose(), or is that part of the 
>dispose() process?
>thanks,
>/garth
>
>
>>From: "Garth Patil" <garthpatil@hotmail.com>
>>Reply-To: "JCS Users List" <jcs-users@jakarta.apache.org>
>>To: jcs-users@jakarta.apache.org
>>Subject: RE: java.lang.InterruptedException on dispose()
>>Date: Mon, 22 Aug 2005 19:45:49 +0000
>>
>>jcs-1.2.6.5 (the current jar from the repository)
>>giving it more time to dispose seems to do the trick. thanks for your 
>>help.
>>
>>>From: "Smuts, Aaron" <Aaron.Smuts@travelocity.com>
>>>Reply-To: "JCS Users List" <jcs-users@jakarta.apache.org>
>>>To: "JCS Users List" <jcs-users@jakarta.apache.org>
>>>Subject: RE: java.lang.InterruptedException on dispose()
>>>Date: Mon, 22 Aug 2005 08:57:48 -0500
>>>
>>>What version of jcs are you using?
>>>
>>>The disk cache probably couldn't complete the defragmentation in time.
>>>This is expected in some situations.  There is a way to extend the
>>>amount of time the disk cache is allowed to work before its queue is
>>>destroyed.
>>>
>>>#This is in seconds
>>>jcs.auxiliary.DC.attributes.ShutdownSpoolTimeLimit=60
>>>
>>>Aaron
>>>
>>> > -----Original Message-----
>>> > From: Garth Patil [mailto:garthpatil@hotmail.com]
>>> > Sent: Saturday, August 20, 2005 3:03 PM
>>> > To: jcs-users@jakarta.apache.org
>>> > Subject: java.lang.InterruptedException on dispose()
>>> >
>>> > Hi,
>>> > I get an exception when trying to dispose a cache. It happens
>>> > intermittently. Any ideas?
>>> >
>>> > Here is the code:
>>> > JCS jcs = JCS.getInstance("someCache");
>>> > //some puts and gets
>>> > jcs.dispose();
>>> >
>>> >
>>> > Here is the config i'm using in cache.ccf:
>>> > #default
>>> > jcs.default=DC
>>> >
>>>jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttribut
>>>es
>>> > jcs.default.cacheattributes.MaxObjects=1000
>>> >
>>>jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory
>>>.l
>>> > ru.LRUMemoryCache
>>> > jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
>>> > jcs.default.elementattributes.IsEternal=true
>>> > jcs.default.elementattributes.IsSpool=true
>>> > jcs.default.elementattributes.IsRemote=true
>>> > jcs.default.elementattributes.IsLateral=true
>>> > #disk cache
>>> >
>>>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=cache
>>> > jcs.auxiliary.DC.attributes.MaxKeySize=10000
>>> >
>>> >
>>> > Here is the exception:
>>> > 861119 [CacheEventQueue.QProcessor-financialCache] ERROR
>>> > org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache  - Failure
>>>updating
>>> > element, cacheName: someCache, key: someKey
>>> > java.lang.InterruptedException
>>> >         at
>>> >
>>>EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLoc
>>>k.
>>> > acquire(Unknown
>>> > Source)
>>> >         at
>>> >
>>>org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doUpdate(IndexedD
>>>is
>>> > kCache.java:356)
>>> >         at
>>> >
>>>org.apache.jcs.auxiliary.disk.AbstractDiskCache$MyCacheListener.handlePu
>>>t(
>>> > AbstractDiskCache.java:548)
>>> >         at
>>> >
>>>org.apache.jcs.engine.CacheEventQueue$PutEvent.doRun(CacheEventQueue.jav
>>>a:
>>> > 652)
>>> >         at
>>> >
>>>org.apache.jcs.engine.CacheEventQueue$AbstractCacheEvent.run(CacheEventQ
>>>ue
>>> > ue.java:567)
>>> >         at
>>> >
>>>org.apache.jcs.engine.CacheEventQueue$QProcessor.run(CacheEventQueue.jav
>>>a:
>>> > 537)
>>> >
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
>>> > For additional commands, e-mail: jcs-users-help@jakarta.apache.org
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: jcs-users-help@jakarta.apache.org
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: jcs-users-help@jakarta.apache.org
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jcs-users-help@jakarta.apache.org
>



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


Mime
View raw message