Details
-
Suggestion
-
Resolution: Fixed
-
None
-
61
-
36
-
Description
NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.
Problem Definition
Tomcat has no automatic way of reporting if there's long running / stuck threads. When troubleshooting performance it can be a lot harder to know what's going on without generating thread dumps. We'd like to automatically get some more information about this.
Suggested Solution
Adding this parameter to the server.xml will log stuck threads in the catalina.out:
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="120" />
This will log any request thread (eg http thread) that has been processing for more than 120 seconds. This will not log background threads, eg scheduled jobs or any long running operation that processes in the background, like import/export, reindex etc.
If you are expecting to see something in these logs that you do not, that does not mean it is not running for more than 60s. It likely just means it is not running in a request thread. Thread dumps over time are still the best way to diagnose long running threads.
Workaround
Manually add StuckThreadDetectionValve to JIRA_INSTALL/conf/server.xml
- This must be done on each node if using JIRA Data Center
Add the following line to the server.xml file. Add this line BEFORE the </Engine> tag located near the end of the file.
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="120" />
EXAMPLE:
- Notice the StuckThreadDetectionValve was added before </Engine> and after the "/>" on the prior line
<Valve className="org.apache.catalina.valves.AccessLogValve" pattern="%a %{jira.request.id}r %{jira.request.username}r %t "%m %U%q %H" %s %b %D "%{Referer}i" "%{User-Agent}i" "%{jira.request.assession.id}r""/> <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="120" /> </Engine> </Service> </Server>
Attachments
Issue Links
- is related to
-
JRASERVER-60547 Improve Tomcat's thread names
- Closed
-
JRASERVER-63084 As an JIRA Administrator I want to have scheduled task to collect performance data
- Closed
- relates to
-
CONFSERVER-40977 Ship Tomcat's long running (stuck) thread logging by default
- Closed
-
JRACLOUD-60546 Ship Tomcat's long running (stuck) thread logging by default
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...