WSVR0605W : Enable Thread Dump on WebSphere

WSVR0605W: Thread <threadname> has been active for <time> and may be hung.  There are <totalthreads> in total in the server that may be hung.

พอดีไปเจอปัญหาเรื่อง  Threads ค้างจนเต็มลิมิต ทำให้  Server ค้างจนเดี้ยง โดยปกติตัว   Container  มันจะ Handle Threads hung ได้ 100 Threads ครับ เริ่มจาก 1 … ไปจนถึง 100 ครบร้อยเมื่อไหร่ ต้อง kill java process ทิ้งสถาณเดียว ซึ่งตอนแรกนั้นผมนึกว่าปัญหามันเกิดมาจากเรา allocate Heap  size ให้กับตัว Server น้อยเกินไป

แต่เอาเข้าจริงๆแล้วมันเป็นน่าจะเป็นที่ตัวโปรแกรมมีจุดที่ทำให้ Memory Leak แน่ๆ ซึ่งการที่จะหาสาเหตุนั้นก็ทำได้  2 อย่างคือเอา Profiler จับ และ เอา Core Dump มา Analyst ด้วย Tool พวก JCA เป็นต้น

โดยผมจะใช้วิธีืที่ 2 แทนแต่โดยปกติแล้วตัว WebSphere จะไม่เปิด feature สำหรับพ่น dump file เราจึงต้องเข้าไปเปิด โดยการเพิ่ม custom properties ให้ตัว App Server ดังนี้ครับ

Resolving the problem

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

  1. From the administrative console, click Servers > Application Servers > server_name.
  2. Under Server Infrastructure, click Administration > Custom Properties.
  3. Click New.
  4. 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 Application Server for the changes to take effect.
อ่านเจอมาจาก http://www-01.ibm.com/support/docview.wss?uid=swg21448581

Leave a comment