The Resource Threads page shows all threads within the Java Virtual Machine (JVM) for this server. Each thread is listed with its Thread ID, Thread Group, Thread Name and Status. The Threads page allows you to generate a stack trace for each individual thread or generate a stack trace for all threads at once.
The threads table has the following columns:
|Thread Id||The thread ID is a number generated when this thread was created. The thread ID is unique and remains unchanged during its lifetime. When a thread is terminated, this thread ID may be reused.|
|Group||The thread group to which this thread belongs. This can be 'Unknown' if this thread has died (been stopped).|
|Name||The verbose name of the thread.|
After these three named columns there is a status indicator for the threads state:
|A thread which is ready to execute, or is actually executing in the Java virtual machine is in this state.|
|A thread that is waiting indefinitely for another thread to perform a particular action is in this state. This state corresponds to an Object Wait/Notify condition becoming satisfied. These conditions are often used to signal explicit interprocess communication, and java Lock semantics.|
|A thread that is waiting for another thread to perform an action (with explicit timeout) is in this state.|
|A thread that is blocked waiting for a monitor (in order to enter a synchronized block) is in this state.|
|A thread in this state indicates it is waiting for a monitor to become free, but FusionReactor has calculated this will never occur due to the state of one or more other threads.|
|A thread that has exited is in this state, i.e. it ran to completion.|
The JavaDoc for java.lang.Thread has more documentation. See:
- Oracle JavaDoc - Thread State It is possible for threads to be in a NEW state. A thread that has been created but not yet started is in this state. FusionReactor does not show new threads. It only shows threads which have actually started.
If any threads are active when they shouldn't be, or are taking up to many resources on the server, then you can kill the thread from this page.
Each thread listed on this page has two buttons next to it. They are:
|Stack Trace||Clicking this button will redirect you to the Stack Trace page which lets you see exactly what is currently going on inside the thread.|
|Kill Thread||Clicking on this link will start the process to kill the thread.
There are 2 stages to this process. If step 1 fails, you can try step 2.
Step 1: Interrupt the thread.
Step 2: Force Thread Death.
Warning - Kill Thread
The "Kill" button does not give a request the opportunity to complete in it's own time (See Warning below). All JVM threads are listed in this page, including those pertaining to the JVM system and J2EE container functions. Killing a thread is a last resort to solving problems and we must caution you that, while FusionReactor does allow you to stop any thread, it is highly inadvisable to stop any threads in the "system" thread group, or any threads integral to the running of your J2EE container.
Warning - Kill Instability with Java 1.5+
FusionReactor's Request Kill (Accessible via the Kill Request button, the Kill ALL button and via Protection strategies) uses our Transit transaction engine to make two attempts to kill a request.
Soft Kill, this interrupts the request while it's outputting data to the web browser. If the request is not outputting data (It might be stuck in a loop or a Java native method for instance), the Soft Kill will time out. FusionReactor then proceeds to a Hard Kill.
Hard Kill is FusionReactors last resort. The thread is interrupted, paused and then stopped. Any Java synchronizers (Monitors) the threads that are held are immediately released. However, in Java 5, Sun/Oracle introduced a new type of lock, the Ownable Synchronizer. These locks are much more versatile, but FusionReactor cannot manipulate them, and killing their owning threads will not automatically release them. In this case, a thread kill will almost certainly lead to a system hang, as other threads wait for a lock release that will never happen.
If FusionReactor detects that the candidate request owns any ownable synchronizers, it will not proceed to a hard kill in order to preserve the integrity of the locking system. If you use the user interface to "Force Thread Death", FusionReactor will attempt the hard kill, but any locks will not be released (You could end up with a system hang. Use this feature with caution).
Threads Menu Options¶
On the page, to the right of of the refresh option, there is a option to stack trace all threads.
|Stack Trace All||Displays a Stack Trace of all currently-running threads. The stack trace is colorized to ease recognition of each part.|
Refreshing the Page¶
At the top of the page you will see the standard page header. At any time you can click the refresh button to update the main content. Alternatively, you can select a time period from the drop-down selection to be able to update the content automatically. Selecting "None" from the drop-down box will stop the automatic refresh, and will require you to manually refresh the page to see any new requests.