You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by WHIRLYCOTT <ph...@whirlycott.com> on 2007/09/29 03:20:14 UTC

"AcitveMQ Connection Worker" threads

Hi,

I'm having a serious problem with a recent AMQ nightly (apache- 
activemq-5.0-20070827.124842-62.zip) that is causing almost 1500  
threads to be created and sit in the background before the jvm runs  
out of memory (OutOfMemoryError: cannot create new native thread).

I have a simple case where I have a few webapps sending messages to  
an AMQ installation on another host on the local network.  After a  
few hours of operation, if I send a kill -SIGQUIT to the webapp jvm,  
I get a thread dump that shows almost 1500 threads shown as:

  "AcitveMQ Connection Worker: tcp://mq.foo.com/192.168.1.45:61616"  
daemon prio=1 tid=0x084d2c98 nid=0x53b waiting on condition  
[0x195e3000..0x195e40a0]
         at sun.misc.Unsafe.park(Native Method)
         at java.util.concurrent.locks.LockSupport.park 
(LockSupport.java:118)
         at java.util.concurrent.locks.AbstractQueuedSynchronizer 
$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
         at java.util.concurrent.LinkedBlockingQueue.take 
(LinkedBlockingQueue.java:359)
         at java.util.concurrent.ThreadPoolExecutor.getTask 
(ThreadPoolExecutor.java:470)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run 
(ThreadPoolExecutor.java:674)
         at java.lang.Thread.run(Thread.java:595)

Since noticing this problem, I've tried turning on failover: to see  
if that made a difference as far as autoreconnect is concerned.  The  
main difference is that I start seeing hundreds of other threads  
piling up and the indication is that our webapp will crash in the  
very near future.  I'm not sure why this is the case, but it's almost  
certainly related to the AMQ problem.

This is straight-up java code going against the JMS api.

Any ideas for fixing this crippling problem?

phil.

PS Sidenote: "AcitveMQ" is misspelled in the source code.

--
                                    Whirlycott
                                    Philip Jacob
                                    phil@whirlycott.com
                                    http://www.whirlycott.com/phil/