Have you ever wondered how hung thread detection works ?
See this article for an excellent approach for hung thread detection in a Java application -
http://www.javaworld.com/community/print/8051
WebSphere Application Server is the ONLY application server that offers hung thread detection (since version 6.1.0.19). The hang detection option for WebSphere Application Server is turned on by default. You can configure a hang detection policy to accommodate your applications and environment so that potential hangs can be reported, providing earlier detection of failing servers. When a hung thread is detected, WebSphere Application Server notifies you so that you can troubleshoot the problem. For details see Infocenter.
WSVR0605W is the message when there is a hung thread.
In WAS 7, WSVR0605W is accompanied by a thread dump of hung thread:
[11/16/09 12:41:03:296 PST] 00000020 ThreadMonitor W WSVR0605W: Thread "WebContainer : 0" (00000021) has been active for 655546 milliseconds and may be hung. There is/are 1 thread(s) in total in the server that may be hung.
at java.lang.Thread.sleep(Native Method)
at java.lang.Thread.sleep(Thread.java:851)
at com.ibm.Sleep.doSleep(Sleep.java:55)
at com.ibm.Sleep.service(Sleep.java:35)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
...
WSVR0606W is the message when a thread that was seen as hung is no longer hung.
Hang detection only monitors managed threads, such as the WebContainer thread pool.
Any native threads, or threads spawned by an application are not monitored.
Happy Debugging!
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.