Skip to main content

developerWorks >  WebSphere  >  Forums  >  IBM WebSphere Application Server Network Deployment V7.0 Open Beta  >  developerWorks

Resource Adapter Work Thread causes ThreadMonitor to log hang detect    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
This question is answered.

Permlink Replies: 2 - Pages: 1 - Last Post: Oct 10, 2008 3:31 AM Last Post By: smalltoken Threads: [ Previous | Next ]
smalltoken

Posts: 16
Registered: Aug 19, 2008 10:49:34 AM
Resource Adapter Work Thread causes ThreadMonitor to log hang detect
Posted: Aug 28, 2008 05:39:28 AM
 
Click to report abuse...   Click to reply to this thread Reply
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)
dave_zavala

Posts: 1
Registered: Oct 09, 2008 12:37:35 PM
Re: Resource Adapter Work Thread causes ThreadMonitor to log hang detect
Posted: Oct 09, 2008 02:51:33 PM   in response to: smalltoken in response to: smalltoken's post
 
Click to report abuse...   Click to reply to this thread Reply
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

Posts: 16
Registered: Aug 19, 2008 10:49:34 AM
Re: Resource Adapter Work Thread causes ThreadMonitor to log hang detect
Posted: Oct 10, 2008 03:31:38 AM   in response to: dave_zavala in response to: dave_zavala's post
 
Click to report abuse...   Click to reply to this thread Reply
Excellent reply!
Thanks,
Smalltoken
 Tags
Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

 

MoreLess 


Point your RSS reader here for a feed of the latest messages in all forums