Analyze Stuck And Hogging Threads

WLSDM for WebLogic
May 15, 2020 · 3 min read

What is Stuck Thread?
A Stuck Thread is a thread which is processing a request for more than maximum time that you
configured in admin console. By Default, the WebLogic server comes with 600 secs. If some thread doesn’t return in 600 secs, It gets a flag ‘stuck thread’.

How to deal with Stuck Thread?
Take thread dumps instantly.
Open thread dumps in visualVM. Analyze dashboard from WebLogic console (managed server > monitoring > threads).
Open thread dump files in “WLSDM Menu > Monitoring & Diagnostics > Profiling Dumps”.

Image for post
Image for post
Monitoring Thread Dump

See how many threads got stuck?
If the stuck thread count is increasing, decreasing or constant ?
If constant then if got stuck on application code etc or not ?

Image for post
Image for post
Stuck Thread Count Dashboard

If getting increase then there would be some serious problem and you have to do a quick health check of you application server, database and other integrated technologies wherever your application reaching like ldap server for authentication, some other API’s or web services etc, and in parallel review thread dumps for stuck threads.

If you have one, two or few constant stuck threads and it’s not increasing so much then you can monitor in WLSDM it for some more time to check if they get clear or not, if not then to clear them you have only option to restart your managed server(s), and its better to restart and clear them before they make further any impact.

What is Hogging Thread?
A hogging thread is a thread which is taking more than usual time to complete the request and can be declared as Stuck .

Image for post
Image for post

How Weblogic determine a thread to declare as hogging?

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)

Image for post
Image for post
View Hogging Threads in WLSDM

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.

Other WLSDM Stuck and hogger thread articles:

  1. https://wlsdm.com/tutorials/how-to-retrieve-the-current-stack-information-from-a-weblogic-server-continuously

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:

Image for post
Image for post
https://wlsdm.com/download

WLSDM for WebLogic

WLSDM is a WebLogic console extension which enables…

WLSDM for WebLogic

Written by

WLSDM for WebLogic

Native Oracle WebLogic Monitoring WLSDM is developed by the best WebLogic developers for the best WebLogic administrators to support mission critical HA domains. Supports all plain WebLogic and Fusion Middleware (FMW) WebLogic domains. Download now! https://wlsdm.com/download

WLSDM for WebLogic

Written by

WLSDM for WebLogic

Native Oracle WebLogic Monitoring WLSDM is developed by the best WebLogic developers for the best WebLogic administrators to support mission critical HA domains. Supports all plain WebLogic and Fusion Middleware (FMW) WebLogic domains. Download now! https://wlsdm.com/download

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store