Tuesday, December 29, 2009

StuckThread Exception

In Application server, mangaged/unmanaged threads can run continuously without interrupting/sleep/wait for a given/sliced time. If the thread exceeds the maximum time configured for StuckThreadMaxTime.

Server keeps the track of when the thread started and how long continuously running, once the thread exceeds time immediatly the respective thread state will changed to STUCK and incident error will be thrown. However, thread will be kept running. Hence, we can consider this as benign error message.

Administrator can take call on based on how many times, this issue comes in a day, and what is the sevearity of this issue giving thread.

Each application server has the provision to configure the max time. We may have a question, why this limitation is required for Server? , this limitation needed for security reasons. Assume that, we have deployed a web application where HTTP call made by crackers/hackers to stop responding application for intented customer by keeping server always busy. Server helps us by notifying server panic state by throwing this error message.

In weblogic, default value for stuckThread Max Time would be 600s.

Environment > servers > soa_server > Configuration > Tuning > change Stuck Thread Max Time

This value has to be changed only when we get stuck thread exception and increasing this number may degrade performance. Maximum 1200s would be the recommended value for weblogic server.

<Apr 3, 2009 4:30:26 PM PDT> <Error> <WebLogicServer> <BEA-000337> <[STUCK] 
ExecuteThread: '1' for queue: 'weblogic.ker 
nel.Default (self-tuning)' has been busy for "1,301" seconds working on the 
request "org.bank.BankUtilityBean_fq50_EOImpl", which is more than the 
configured time (StuckThreadMaxTime) of "1,200" seconds. Stack trace: 
java.net.SocketInputStream.socketRead0(Native Method) 

No comments:

Post a Comment

Recent Posts

Unix Commands | List all My Posts


This blog intended to share the knowledge and contribute to JAVA Community such a way that by providing samples and pointing right documents/webpages. We try to give our knowledege level best and no guarantee can be claimed on truth. Copyright and Terms of Policy refer blogspot.com