aspose file tools*
The moose likes BEA/Weblogic and the fly likes Kill server instance when 'Thread Pool Stuck Thread' is detected Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Kill server instance when Watch "Kill server instance when New topic
Author

Kill server instance when 'Thread Pool Stuck Thread' is detected

Javian Berts
Greenhorn

Joined: May 08, 2009
Posts: 15
I would like to shutdown my server instance whenever a thread is detected to be stuck for a period of time so that my nodemanager could bring it up again. How do I come about doing that?

Thanks in advance.

Javian
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Technically you could do that by looking up a thread related MBean and restarting the server when your program detects that there are stuck threads.

However the right approach would be to figure out why the threads are 'STUCK' in the first place


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

you can guide the server to restart the server when the number of stuck threads exceeds a particular limit.

check the admin console for the same!

I did this using the node manager, and it worked!


Regards, Sud.
SCJP 5 ScjpFAQ JLS
Javian Berts
Greenhorn

Joined: May 08, 2009
Posts: 15
Hi guys,

Thanks for all your input. Really appreciate it.

Sudipto, are you using the workmanager to do so? I am following the steps listed on:

http://download.oracle.com/docs/cd/E15523_01/web.1111/e13701/self_tuned.htm


However, I am not sure where to place this segment:

<work-manager>
<name>stuckthread_workmanager</name>
<work-manager-shutdown-trigger>
<max-stuck-thread-time>30</max-stuck-thread-time>
<stuck-thread-count>2</stuck-thread-count>
</work-manager-shutdown-trigger>
</work-manager>

in the config.xml. Any idea where I should put it? Thanks again.
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Hey Mr. Berts,

I found out something for you.

Refer to this ; might help.

Good luck
Javian Berts
Greenhorn

Joined: May 08, 2009
Posts: 15
Will check it out. Thanks, Sudipto.
 
wood burning stoves
 
subject: Kill server instance when 'Thread Pool Stuck Thread' is detected