Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-5355

PSMQ threads can use excessive heap

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 3.2.11, 3.8.2
    • 3.2.0, 3.3.0, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.1
    • Automation

    Description

      Description of problem
      In JIRA Service Desk, PSMQ is a component of automation and is present in versions 3.2.x and newer.

      • Note: PSMQ is present but not enabled in 3.2.x.
      • Enabled by default in 3.3.x and newer

      PSMQ uses execution threads that are part of a thread pool and these threads are reused. A PSMQ thread may take up an excessive amount of heap due to the way threads are reused.

      Experienced Behavior
      PSMQ threads using excessive heap. This can cause other effects, such as an OutOfMemory error.

      When viewing heap dump:

      • PSMQ threads referred to as "PsmmqAsyncExecutors-job"
      • Thread is retaining a large amount of heap
      • Investigating the thread shows that heap is associated with ThreadLocalMap and com.atlassian.jira.issue.index.SearcherCache

      Details
      This problem manifests on Automation PSMQ thread pool. Since threads are being reused, they might have pretty long lifetimes, and it seems like JiraThreadLocalUtils is calling the DefaultIndexManager#flushThreadLocalSearcher method, however in SearcherCache it will reassign the variable to a new map, rather than using ThreadLocal.remove() during threads lifetimes.

      Attachments

        1. PSMQ-Heap.PNG
          36 kB
          Tim Evans

        Issue Links

          Activity

            People

              mmcmahon Matthew McMahon (Inactive)
              tevans Tim Evans (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync