APPLIES TO:
Oracle WebLogic Server - Version 10.0 and laterInformation in this document applies to any platform.
***Checked for relevance on 10-Aug-2016***
GOAL
The purpose of this note is to provide a formal definition of stuck threads in WebLogic Server.
SOLUTION
Stuck Thread
A thread might get stuck for various reasons. For example: When an SQL query is running and the time it takes to complete is say 800 seconds, then, as the default stuck thread timing is 600 seconds in WebLogic Server, the thread allocated for that query waits for 600 seconds and goes to stuck state.
The stuck state does not mean that it is stuck forever, and it might get unstuck at a later point of time which can be checked in the logs. But if there is no reference like that in the logs, then we might infer that the thread got stuck forever.
Tuning the Execute Thread Detection Behavior
WebLogic Server automatically detects when a thread in an execute queue becomes "stuck." Because a stuck thread cannot complete its current work or accept new work, the server logs a message each time it diagnoses a stuck thread.
If all threads in an execute queue become stuck, the server changes its health state to either "warning" or "critical" depending on the execute queue.
If all threads in the default queue become stuck, the server changes its health state to "critical." (The Node Manager application can automatically shut down and restart servers in the critical health state.)
If all threads in weblogic.admin.HTTP, weblogic.admin.RMI, or a user-defined execute queue become stuck, the server changes its health state to "warning."
WebLogic Server diagnoses a thread as stuck if it is continually working (not idle) for a set period of time. You can tune a server's thread detection behavior by changing the length of time before a thread is diagnosed as stuck, and by changing the frequency with which the server checks for stuck threads.
To configure WebLogic Server stuck thread detection behavior
- Start the Administration Server if it is not already running.
- Access the Administration Console for the domain.
- Expand the Servers node in the left pane to display the servers configured in your domain.
- Click the name of the server instance that you want to modify for improved stuck thread detection.
- Select the Configuration -> Tuning tab in the right pane.
- Modify the following attributes as necessary to tune thread detection behavior for the server:
Stuck Thread Max Time: Enter the number of seconds, that a thread must be continually working before this server diagnoses the thread as being stuck. By default, WebLogic Server considers a thread to be "stuck" after 600 seconds of continuous use.
Stuck Thread Timer Interval: Enter the number of seconds, after which WebLogic Server periodically scans threads to see if they have been continually working for the length of time specified by Stuck Thread Max Time. By default, WebLogic Server sets this interval to 600 seconds. - Click Apply to save your changes.
- Reboot the server to use the new settings.
GKontos
Comments