2013년 1월 28일 월요일

[TechNote] Configuring the WebSphere Application Server hung thread detector to automatically produce a javacore or thread dump

Configuring the WebSphere Application Server hung thread detector to automatically produce a javacore or thread dump


Problem(Abstract)

By default, WebSphere Application Server reports potentially hung threads using the hung thread detection policy. When a thread has been running for a certain interval (default 10 minutes), the thread might be reported as hung and a WSVR0605W message is printed in the SystemOut.log file. By setting a custom property in WebSphere Application Server, the hung thread detection policy will generate a javacore (or thread dump on Solaris and HP-UX) when a potentially hung thread is reported.

Symptom

A javacore, or thread dump, will be created each time a potentially hung thread is detected and a WSVR0605W message is written out to the SystemOut.log file:
WSVR0605W: Thread <threadname> has been active for <time> and may be hung. There are <totalthreads> in total in the server that may be hung.


The javacore can then be used to determine what code is running in the potentially hung thread and if there are other bottlenecks existing in the JVM, causing the reported hung thread. This can be helpful in troubleshooting server hangs and performance issues.

Note: It might be normal for certain threads to be running for long periods of time. These might be falsely reported as hung threads.

Environment

The com.ibm.websphere.threadmonitor.dump.java property was enabled in WebSphere Application Server V6.0.2.29, 6.1.0.19, and 7.0 and later.

Resolving the problem

Set the com.ibm.websphere.threadmonitor.dump.java property to true:

Application Servers:
  1. From the administrative console, click Servers > Application Servers > server_name.
  2. Under Server Infrastructure, click Administration > Custom Properties.
  3. Click New and add the following property:

    Name: com.ibm.websphere.threadmonitor.dump.java
    Value: true

  4. Click Apply.
  5. Click OK and save the configuration changes.
  6. Restart the Application Server for the changes to take effect.
Node Agent:
  1. From the administrative console, click System Administration > Node Agents > nodeagent.
  2. Under Additional Properties, click Administration Services
  3. Under Additional Properties, click Custom Properties
  4. Click New and add the following property:

    Name: com.ibm.websphere.threadmonitor.dump.java
    Value: true

  5. Click Apply.
  6. Click OK and save the configuration changes.
  7. Restart the Node Agent for the changes to take effect.

댓글 없음:

댓글 쓰기