Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-60546

Ship Tomcat's long running (stuck) thread logging by default

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Invalid
    • None
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? 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="60" />
      

      This will log any request thread (eg http thread) that has been processing for more than 60 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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dcurrie@atlassian.com Dave C
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: