jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Archer" <scott.arc...@gmail.com>
Subject Re: JCS Hangs on server shutdown.
Date Fri, 19 Dec 2008 14:39:34 GMT
CompositeCacheManager.getInstance().shutDown();

is all we're calling on shutdown.

Could this be the problem?

On Thu, Dec 18, 2008 at 3:12 PM, Akture, Alper <Alper.Akture@disney.com>wrote:

> I can't say this is the problem, but are you calling dispose() on your
> org.apache.jcs.JCS instance when you are shutting down?
>
> Alper
>
> -----Original Message-----
> From: jcs-users-return-2305-Alper.Akture=disney.com@jakarta.apache.org
> [mailto:jcs-users-return-2305-Alper.Akture=disney.com@jakarta.apache.org
> ] On Behalf Of Scott Archer
> Sent: Thursday, December 18, 2008 1:01 PM
> To: JCS Users List; asmuts@yahoo.com
> Subject: Re: JCS Hangs on server shutdown.
>
> Hey I'm still having problems with threads hanging and keeping tomcat
> alive
> when I shutdown JCS.
> I updated to the latest version from the link you gave me.
>
> I was going to check out the source code from subversion, but the
> subversion
> server listed on the website is not working.
> (won't allow me to check out code).
>
> Could someone give me a working svn url?
>
> Or take a look at this thread dump.
>
> Thanks,
>
> Scott
>
> Here's the thread dump
>
> Full thread dump Java HotSpot(TM) Client VM (11.0-b15 mixed mode,
> sharing):
>
> "DestroyJavaVM" prio=10 tid=0x09e77400 nid=0x155f waiting on condition
> [0x00000000..0xb7eee070]
>   java.lang.Thread.State: RUNNABLE
>
> "Thread-69" prio=10 tid=0x09c22000 nid=0x15b1
> sleeping[0xb4fa6000..0xb4fa6db0]
>   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)
>
> "http-8080-1" daemon prio=10 tid=0x0a2c0400 nid=0x15a5 in Object.wait()
> [0xb48a3000..0xb48a40b0]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x527a43b0> (a
> org.apache.tomcat.util.net.JIoEndpoint$Worker)
>        at java.lang.Object.wait(Object.java:485)
>        at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416
> )
>        - locked <0x527a43b0> (a
> org.apache.tomcat.util.net.JIoEndpoint$Worker)
>        at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
>        at java.lang.Thread.run(Thread.java:619)
>
> "MultiThreadedHttpConnectionManager cleanup" daemon prio=10
> tid=0x09ca4000
> nid=0x157a in Object.wait() [0xb4c72000..0xb4c72db0]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x4f4b91e0> (a java.lang.ref.ReferenceQueue$Lock)
>        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
>        - locked <0x4f4b91e0> (a java.lang.ref.ReferenceQueue$Lock)
>        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
>        at
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$Referen
> ceQueueThread.run(MultiThreadedHttpConnectionManager.java:1122)
>
> "TP-Processor4" daemon prio=10 tid=0x09e6d800 nid=0x1577 in
> Object.wait()
> [0xb534e000..0xb534f130]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x4f59b778> (a org.apache.jk.common.ChannelSocket)
>        at java.lang.Object.wait(Object.java:485)
>        at
> org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:300)
>        - locked <0x4f59b778> (a org.apache.jk.common.ChannelSocket)
>        at
> org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:
> 660)
>        at
> org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.ja
> va:870)
>        at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:690)
>        at java.lang.Thread.run(Thread.java:619)
>
> "TP-Processor3" daemon prio=10 tid=0x0a208800 nid=0x1576 runnable
> [0xb539f000..0xb539ffb0]
>   java.lang.Thread.State: RUNNABLE
>        at java.net.SocketInputStream.socketRead0(Native Method)
>        at java.net.SocketInputStream.read(SocketInputStream.java:129)
>        at
> java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
>        at
> java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
>        at
> java.io.BufferedInputStream.read(BufferedInputStream.java:317)
>        - locked <0x4f5f7af8> (a java.io.BufferedInputStream)
>        at
> org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:620)
>        at
> org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:558)
>        at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
> 685)
>        at
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.
> java:889)
>        at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:690)
>        at java.lang.Thread.run(Thread.java:619)
>
> "Timer-6" daemon prio=10 tid=0x09fc7800 nid=0x1570 in Object.wait()
> [0xb4e62000..0xb4e630b0]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x4e972168> (a java.util.TaskQueue)
>        at java.lang.Object.wait(Object.java:485)
>        at java.util.TimerThread.mainLoop(Timer.java:483)
>        - locked <0x4e972168> (a java.util.TaskQueue)
>        at java.util.TimerThread.run(Timer.java:462)
>
> "Timer-0" daemon prio=10 tid=0x09baa000 nid=0x156a in Object.wait()
> [0xb5048000..0xb5048db0]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x4e8c5d90> (a java.util.TaskQueue)
>        at java.lang.Object.wait(Object.java:485)
>        at java.util.TimerThread.mainLoop(Timer.java:483)
>        - locked <0x4e8c5d90> (a java.util.TaskQueue)
>        at java.util.TimerThread.run(Timer.java:462)
>
> "ElementEventQueue.QProcessor-1" daemon prio=10 tid=0x09f91000
> nid=0x1568 in
> Object.wait() [0xb510e000..0xb510f0b0]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x4d2b54b8> (a java.lang.Object)
>        at java.lang.Object.wait(Object.java:485)
>        at
> org.apache.jcs.engine.control.event.ElementEventQueue.take(ElementEventQ
> ueue.java:181)
>        - locked <0x4d2b54b8> (a java.lang.Object)
>        at
> org.apache.jcs.engine.control.event.ElementEventQueue.access$300(Element
> EventQueue.java:35)
>        at
> org.apache.jcs.engine.control.event.ElementEventQueue$QProcessor.run(Ele
> mentEventQueue.java:245)
>
> "Low Memory Detector" daemon prio=10 tid=0x09b04c00 nid=0x1565 runnable
> [0x00000000..0x00000000]
>   java.lang.Thread.State: RUNNABLE
>
> "CompilerThread0" daemon prio=10 tid=0x09b01c00 nid=0x1564 waiting on
> condition [0x00000000..0xb571bae8]
>   java.lang.Thread.State: RUNNABLE
>
> "Signal Dispatcher" daemon prio=10 tid=0x09b00000 nid=0x1563 waiting on
> condition [0x00000000..0x00000000]
>   java.lang.Thread.State: RUNNABLE
>
> "Finalizer" daemon prio=10 tid=0x09af9c00 nid=0x1562 in Object.wait()
> [0xb5803000..0xb5803f30]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x4cf20238> (a java.lang.ref.ReferenceQueue$Lock)
>        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
>        - locked <0x4cf20238> (a java.lang.ref.ReferenceQueue$Lock)
>        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
>        at
> java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
>
> "Reference Handler" daemon prio=10 tid=0x09af5400 nid=0x1561 in
> Object.wait() [0xb5854000..0xb5854db0]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x4cf202c0> (a java.lang.ref.Reference$Lock)
>        at java.lang.Object.wait(Object.java:485)
>        at
> java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
>        - locked <0x4cf202c0> (a java.lang.ref.Reference$Lock)
>
> "VM Thread" prio=10 tid=0x09af3800 nid=0x1560 runnable
>
> "VM Periodic Task Thread" prio=10 tid=0x09b18800 nid=0x1566 waiting on
> condition
>
> JNI global references: 1209
>
> Heap
>  def new generation   total 28096K, used 6331K [0x48060000, 0x49ed0000,
> 0x4cf20000)
>  eden space 25024K,  18% used [0x48060000, 0x48503300, 0x498d0000)
>  from space 3072K,  51% used [0x498d0000, 0x49a5bc78, 0x49bd0000)
>  to   space 3072K,   0% used [0x49bd0000, 0x49bd0000, 0x49ed0000)
>  tenured generation   total 373020K, used 290228K [0x4cf20000,
> 0x63b67000,
> 0x88060000)
>   the space 373020K,  77% used [0x4cf20000, 0x5ea8d2c8, 0x5ea8d400,
> 0x63b67000)
>  compacting perm gen  total 33280K, used 33160K [0x88060000, 0x8a0e0000,
> 0x94060000)
>   the space 33280K,  99% used [0x88060000, 0x8a0c2338, 0x8a0c2400,
> 0x8a0e0000)
>    ro space 8192K,  74% used [0x94060000, 0x94653488, 0x94653600,
> 0x94860000)
>    rw space 12288K,  58% used [0x94860000, 0x94f6db20, 0x94f6dc00,
> 0x95460000)
>
> On Mon, Dec 8, 2008 at 9:53 AM, Aaron Smuts <asmuts@yahoo.com> wrote:
>
> > 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 <scott.archer@gmail.com> wrote:
> >
> > > From: Scott Archer <scott.archer@gmail.com>
> > > 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
> > > <forbes.al@googlemail.com> 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 <scott.archer@gmail.com>
> > > >
> > > > > 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.IndexedDiskCacheF
> actory
> > > > >
> > > > >
> > > >
> > >
> >
> jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe
> dDiskCacheAttributes
> > > > > 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: 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message