Wednesday, February 6, 2013

WLS - How to setup bounce after # of Stuck Threads

The purpose of this article is to show how you can setup your weblogic server to 'take a control' when you face some numbers of STUCK THREADS and then system will probably crash.

So, basically you have to options here:
1)Thru UI
2)Thru WLST command line.

1.1) Go thru UI(Home>> Environment>>Servers>>Select Server that you want to apply this change)

Here you need to set , at least , failure action to Force immediate shutdown.

1.2) Set the maximum count and the Save and activate changes.

Here I am updating the maximum of Stuck Thread counts that I will allow.


2.1) If you want to execute from WLST command:

Basically just grab that steps above using 'record mode' into WLS then...


You just need to grab this content above , include into wlst file and execute the command to change these settings into your WLS. Eg:(java weblogic.WLST filerelated).

NOTE:
1) If you are using a NodeManager. It can just restart your server when you shutdown because of Stuck-threads issue. This way your down time will be less.

2) You also can control Stuck-Threads issues from application level using:

weblogic-application.xml.
...
<application-admin-mode-trigger>
<max-stuck-thread-time>300</max-stuck-thread-time>
<stuck-thread-count>5</stuck-thread-count>
</application-admin-mode-trigger>





I hope this helps,
Thiago Leoncio.