View Threads¶
View Threads lists the JVM's live threads and what each is doing, inside the Help -> Monitor Server Resources dialog. It writes no file and pauses nothing, which makes it the right first move whenever a channel is running but not progressing.
When to use it¶
A channel is started but messages are not moving. The list shows each of the channel's threads, the message it is working on, and its state. A processor that shows the same Message ID each time you click Refresh is still working on that message. The list does not show what a thread is waiting on: a Thread Dump shows that.
Before taking a thread dump. A Thread Dump briefly pauses processing and produces a file someone has to read. If View Threads already answers the question, you have saved both.
Checking whether a thread pool is exhausted. If every processor thread is busy and the inbound queue is growing, the channel is not stuck. It is saturated, which is a different problem with a different fix. See Thread Pools.
Reading the list¶
Each row is one thread. The Thread State column shows the state the JVM reports for it:
RUNNABLE: The thread is working, or is inside a network or database call.BLOCKED: The thread is waiting for a lock that another thread holds.WAITINGorTIMED_WAITING: The thread is idle and waiting for work, sleeping, or waiting for a resource such as a database connection.
Look for a pattern across threads, not for how many there are. A healthy busy system has plenty of active threads.
- Several threads that stay
BLOCKEDpoints at contention for a lock. In a cluster, check whether a shared cache mutex is involved, since an in-memory mutex does not coordinate across instances (see Shared Cache Settings). - Threads that are idle while a queue grows points at configuration rather than blockage.
The Message ID column shows the message a thread is working on. A processor that has picked up a message before it is assigned a message ID shows the message's source ID instead, followed by "(source)" (e.g. 40 (source)).
Stopping, Waking and Killing a Thread¶
Each thread that QIE manages has three buttons in its row. Threads that QIE does not manage show no buttons.
Stop: Asks the thread to stop, giving it time to shut down correctly. A thread that is busy stops once it reaches a point where it checks for the request.
Wake: Ends the wait of a thread that is idle, so it checks for work immediately instead of at the end of its wait. It has no effect on a thread that is busy, and some background threads do not respond to it.
Kill: Available only after Stop has been used on the thread. Interrupts the thread, which frees one that is waiting or sleeping so it acts on the stop request. It does not free a thread that is inside a network or database call.
In a cluster¶
The list is for the instance selected in the dialog. Confirm which node is affected from Global System Status before drawing conclusions. A healthy thread list only tells you that that node is healthy.