WebLogic Stuck Threads: Understanding Hogger and Stuck threads
Stuck Threads are threads that are blocked, and can’t return to the threadpool for a certain amout of time. By Default, the WLS comes with 600 secs. If some thread doesn’t return in 600 secs, It gets a flag ‘stuck thread’.
- Stuck Threads are only flags, there to warn you that this thread is taking too long.
- A thread declared as Stuck if it runs over 600 secs (default configuration which you can increase or decrease from admin console).
There is an internal WebLogic polar which runs every 2 secs (by default 2 secs and can be alter)
It checks for the number of requests completed in last two minutes
Then it check how much times each took to complete
Then it takes the average time of all completed request (completed in last 2 sec)
Then multiply average time with 7, and the value came consider as “usual time to complete the request”
Now weblogic check each current executed thread in last 2 secs and compare with above average time, if for any of the thread it’s above this value then that thread will declare as Hogged thread.
Stuck and Hogger Monitoring and How to Dealing Help with WLSDM
- WebLogic Server Performance issues monitoring stuck and hogger threads available in “Domain structure > Environment > Servers > ServerName > Monitoring > Threads” as below screencapture.
2. WLSDM notifications available to monitoring stuck & hogger threads and possible root cause for them.
3. When you click “Stuck Threads” button, you will see a modal window about stuck thread count.
4. Click “View Stack Trace” button. There is modal window will open about stack treace log.
5. You can Open it with WLSDM “Thread Dump Analyzer” then you can see thread state (RUNNABLE, BLOCKED, WAITING, TIMED_WAITING).
RUNNABLE: The thread is executing in the JVM.
BLOCKED: The thread is blocked waiting for a monitor lock.
WAITING: The thread is waiting indefinitely for another thread to perform a particular action.
TIMED_WAITING: The thread is waiting for another thread to perform an action for up to a specified waiting time.
Installation is really easy and you can setup a complete monitoring infrastructure in less than 5 minutes. If you want to try then go to download page below URL: