This discussion is archived
4 Replies Latest reply: Jan 13, 2012 10:31 AM by rukbat RSS

Jms threads are in TIMED_WAITING state

843830 Newbie
Currently Being Moderated
Hi,

We are running on JBoss 4.0.5, jdk 5.
We are performing load test, and sending ~20000 JMS messages per minute.
We notice the the Jms queue depth is continuously growing (it reaches about 300000 !).

We increased the number of MDBs consuming messages from this queue to 200, but for some reason it seems most of the MDBs (175 out of 200) are in state : TIMED_WAITING . (see example for one of the MDBs in the thread dump below)

"JMS SessionPool Worker-198" daemon prio=10 tid=0x00f11800 nid=0x184 in Object.wait() [0x1327f000..0x1327fa70]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
     at java.lang.Object.wait(Native Method)
     at EDU.oswego.cs.dl.util.concurrent.SynchronousChannel.poll(SynchronousChannel.java:353)
     - locked <0xaeaa5788> (a EDU.oswego.cs.dl.util.concurrent.LinkedNode)
     at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(PooledExecutor.java:723)
     at org.jboss.jms.asf.StdServerSessionPool$MyPooledExecutor.getTask(StdServerSessionPool.java:397)
     at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:747)
     at java.lang.Thread.run(Thread.java:619)

Our application is running on a very strong T2000 machine with 32 cpu ( cpu load is 15%) and 3 giga memory ( memory consumption is 50%).

Our question: why are most of our Jms threads (MDBs) in TIMED_WAITING state?

your help is appreciated
John
  • 1. Re: Jms threads are in TIMED_WAITING state
    843830 Newbie
    Currently Being Moderated
    Hi
    I am having a similar problem, I am running JBoss 4.0.5 with built in Tomcat 5.5 on JDK 5.

    I noticed that I have hundreds of threads in TIMED_WAITING or WAITING status, Apparently these threads never get out of this status.
    Their number increases to thousands at which time the server stops responding and I have to restart Jboss.
    Any help in determining what to do with these threads is highly appreciated..
    Thread: UIL2.SocketManager.WriteTask#32 client=10.1.12.234:8093 : priority:5, demon:true, threadId:160, threadState:WAITING, threadLockName:java.lang.Object@dc75228
    
        java.lang.Object.wait(Native Method)
        java.lang.Object.wait(Object.java:474)
        EDU.oswego.cs.dl.util.concurrent.LinkedQueue.take(LinkedQueue.java:122)
        org.jboss.mq.il.uil2.SocketManager$WriteTask.run(SocketManager.java:518)
        java.lang.Thread.run(Thread.java:595)
    Also:
    Thread: UIL2(SocketManager.MsgPool@6270778e client=10.1.12.234:8093)#8 : priority:5, demon:true, threadId:107389, threadState:TIMED_WAITING, threadLockName:EDU.oswego.cs.dl.util.concurrent.LinkedNode@5cf8aa0f
    
        java.lang.Object.wait(Native Method)
        EDU.oswego.cs.dl.util.concurrent.SynchronousChannel.poll(SynchronousChannel.java:353)
        EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(PooledExecutor.java:723)
        EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:747)
        java.lang.Thread.run(Thread.java:595)
    or these:
    Thread: TP-Processor55 : priority:5, demon:true, threadId:28644, threadState:RUNNABLE, threadLockName:null
    
        java.net.SocketInputStream.socketRead0(Native Method)
        java.net.SocketInputStream.read(SocketInputStream.java:129)
        java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
        java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
        java.io.BufferedInputStream.read(BufferedInputStream.java:313)
        org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:620)
        org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:558)
        org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:685)
        org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
        org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        java.lang.Thread.run(Thread.java:595)
  • 2. Re: Jms threads are in TIMED_WAITING state
    804902 Newbie
    Currently Being Moderated
    Has anyone found a root cause or solution to this high number of threads in TIMED_WAITING state. I am having this problem.
  • 3. Re: Jms threads are in TIMED_WAITING state
    gimbal2 Guru
    Currently Being Moderated
    Don't resurrect old threads. Create a new thread and post as much information as you can, including configuration specifics. Application server, version of Java, OS, JMS broker, how you configured the JMS broker, the code you use to send messages, etc. etc.
  • 4. Re: Jms threads are in TIMED_WAITING state
    rukbat Guru Moderator
    Currently Being Moderated
    This thread is now locked
    No one is monitoring it after five years. No one will respond.
    (Oh, and the original poster user "840827" is a catch-all aggregate from other forum websites that were merged into OTN a couple of years ago. It's not a real person.)