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

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(
     - locked <0xaeaa5788> (a EDU.oswego.cs.dl.util.concurrent.LinkedNode)
     at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(
     at org.jboss.jms.asf.StdServerSessionPool$MyPooledExecutor.getTask(
     at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$

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
  • 1. Re: Jms threads are in TIMED_WAITING state
    843830 Newbie
    Currently Being Moderated
    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= : priority:5, demon:true, threadId:160, threadState:WAITING, threadLockName:java.lang.Object@dc75228
        java.lang.Object.wait(Native Method)
    Thread: UIL2(SocketManager.MsgPool@6270778e client= : priority:5, demon:true, threadId:107389, threadState:TIMED_WAITING, threadLockName:EDU.oswego.cs.dl.util.concurrent.LinkedNode@5cf8aa0f
        java.lang.Object.wait(Native Method)
    or these:
    Thread: TP-Processor55 : priority:5, demon:true, threadId:28644, threadState:RUNNABLE, threadLockName:null
  • 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.)