On orderly shutdown, the cache will flush the memory contents to disk, if the 
region is configured to use a disk cache.  These items will go into purgatory, 
the buffer on the way to disk.  The disk cache will try to persist the contents 
of purgatory to disk.  If you are using the indexed disk cache or the block 
disk cache, it will also try to write the keys to disk.  By default the 
shutdown process will give the disk cache 60 seconds to do this.  It's 
configurable.   . . . Since you say that you have a lot of items in the cache, 
this might take a while. . . .  Does it hang indefinitely?  

If you use the UPDATE disk usage pattern, then the disk cache will only have to 
write the keys, since all the items in memory will already be on disk.

You can also configure the disk cache to optimize the data store on shutdown.  
I see that you've turned this off.  That's fine.

Oh, and please use the latest version in the temp builds directory.  1.3 is 
missing tons of new features.

Cheers,

Aaron


--- On Fri, 12/5/08, Scott Archer <[EMAIL PROTECTED]> wrote:

> From: Scott Archer <[EMAIL PROTECTED]>
> Subject: Re: JCS Hangs on server shutdown.
> To: "JCS Users List" <jcs-users@jakarta.apache.org>
> Date: Friday, December 5, 2008, 6:17 AM
> I'll try that thanks,
> 
> I'm running on ubuntu linux 8.10 server.
> 1.6.0_10-b33 (sun jdk)
> Apache Tomcat 6.0.18
> 
> We've got a lot of data in our cache, and we want the
> cache data to be
> persistent between restarts.
> 
> Thanks again,
> 
> Scott
> 
> 
> 
> 
> On Fri, Dec 5, 2008 at 2:13 AM, Al Forbes
> <[EMAIL PROTECTED]> wrote:
> 
> > Hi Scott,
> >
> > I have not seen anything like that. What OS are you
> using? Maybe try an
> > older version of Java.
> >
> > There are some changes to the shutdown in the latest
> (still unreleased
> > versions). Try one of these:
> >
> >
> http://svn.apache.org/viewvc/jakarta/jcs/trunk/tempbuild/
> >
> > Regards
> > Al
> >
> > 2008/12/4 Scott Archer <[EMAIL PROTECTED]>
> >
> > > I'm having trouble with a JCS thread hanging
> when we shutdown our tomcat
> > > server.
> > >
> > > Full thread dump Java HotSpot(TM) Client VM
> (11.0-b15 mixed mode,
> > sharing):
> > >
> > > "DestroyJavaVM" prio=10 tid=0xb4ba2400
> nid=0x2888 waiting on condition
> > > [0x00000000..0xb7e7c070]
> > >   java.lang.Thread.State: RUNNABLE
> > >
> > > "Thread-71" prio=10 tid=0xb51a2000
> nid=0x2933
> > > sleeping[0xb4afe000..0xb4afedb0]
> > >   java.lang.Thread.State: TIMED_WAITING
> (sleeping)
> > >        at java.lang.Thread.sleep(Native Method)
> > >        at
> > >
> > >
> >
> org.apache.jcs.auxiliary.disk.AbstractDiskCache$1.run(AbstractDiskCache.java:404)
> > >        at java.lang.Thread.run(Thread.java:619)
> > >
> > > ....
> > >
> > >
> > > This is my auxillary cache config:
> > >
> > >
> > >
> >
> jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
> > >
> > >
> >
> jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
> > > jcs.auxiliary.DC.attributes.DiskPath=/jcs
> > >
> jcs.auxiliary.DC.attributes.MaxPurgatorySize=500000
> > > jcs.auxiliary.DC.attributes.MaxKeySize=500000
> > >
> jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000
> > >
> jcs.auxiliary.DC.attributes.MaxRecycleBinSize=7500
> > >
> jcs.auxiliary.DC.attributes.OptimizeOnShutdown=false
> > >
> > > We are calling:
> > > CompositeCacheManager.getInstance().shutDown();
> > > in the contextDestroyed method of our
> ContextListener. (webapp)
> > >
> > >
> > > Any ideas or suggestions?
> > > I'll be glad to give you more info if needed.
> > >
> > >
> > > Thanks!
> > >
> >

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

Reply via email to