Topic
2 replies Latest Post - ‏2008-10-10T07:31:38Z by smalltoken
smalltoken
smalltoken
14 Posts
ACCEPTED ANSWER

Pinned topic Resource Adapter Work Thread causes ThreadMonitor to log hang detect

‏2008-08-28T09:39:28Z |
I have a resource adapter spinning off long running worker threads which are essentially reading a socket.

The ThreadMonitor hand detect kicks in and logs the following. I've seen how I can turn hang detect off but that feature may be useful elsewhere.

Is there any config which I can turn off hang detect for specific resource adapters?

I thought that the whole point of resource adapter work threads was that they could be long running - i.e. WAS can't know what my legacy adapter underneath will be doing or for how long.

28/08/08 10:26:48:321 BST 0000002a ThreadMonitor W WSVR0605W: Thread "Default : 0" (00000009) has been active for 717715 milliseconds and may be hung. There is/are 5 thread(s) in total in the server that may be hung.
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.net.SocketInputStream.read(SocketInputStream.java:182)
at biz.wss.mailbox.proxy.connection.client.MailboxProxyClient.sendAndRecieve(MailboxProxyClient.java:99)
at biz.wss.mailbox.proxy.connection.client.MailboxProxyClient.getMessage(MailboxProxyClient.java:148)
at biz.wss.ra.MailboxToJMSThread.run(MailboxToJMSThread.java:205)
at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:399)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1488)
Updated on 2008-10-10T07:31:38Z at 2008-10-10T07:31:38Z by smalltoken
  • dave_zavala
    dave_zavala
    1 Post
    ACCEPTED ANSWER

    Re: Resource Adapter Work Thread causes ThreadMonitor to log hang detect

    ‏2008-10-09T18:51:33Z  in response to smalltoken
    The work manager uses a user-specified thread pool. If one is not specified, it uses the default thread pool. In either case, the work manager uses "managed threads". Managed threads are monitored by default in WAS6.1 and 7.0.

    We cannot specify which managed threads are monitored, and which aren't. So, it's impossible to disable thread monitoring for a specific work manager instance used by a resource adapter. In the case you presented, the work submitted to the work manager by the resource adapter causes the worker thread to wait on a socket "read" and remain active beyond the monitor threshold. Exercising the work manager in this way can be problematic. For example, if the resource adapter submits several long-running work requests, its throughput may decrease as the work manager's underlying thread pool is exhausted and cannot dispatch work. Since the resource adapter appears to be performing essential work on the application server, however, you may want to tune the thread monitor rather than disable it.

    Here are some related URLs to the WebSphere Application Server InfoCenter:

    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/cxml_configmodel.html
    http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/ttrb_confighangdet.html

    Consider changing the monitoring threshold -- the amount of time a thread is active (how long its run method has been executing) before it is considered hung. You can increase this value to the expected execution time of the work submitted by the resource adapter. Also, you can specify the monitoring alarm threshold, which will cause the monitor threshold to automatically increase when the prescribed number of hung threads is detected.

    If the work submitted by the resource adapter will cause the worker threads to wait indefinitely (i.e. not return to the pool for extremely long periods), I suggest disabling the thread monitor.
    • smalltoken
      smalltoken
      14 Posts
      ACCEPTED ANSWER

      Re: Resource Adapter Work Thread causes ThreadMonitor to log hang detect

      ‏2008-10-10T07:31:38Z  in response to dave_zavala
      Excellent reply!
      Thanks,
      Smalltoken