Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-67281

Potential Lucene leak on using org.apache.lucene.search.HitQueue / ScoreDoc with plugins using Lucene

XMLWordPrintable

      Summary

      JIRA might see increased memory and GC pressure while responding to search requests fulfilled by Lucene used by 3rd party plugins eg: Zephyr
      The plugin can allocate huge amounts of memory very fast, this memory will get collected by a Full GC which might cause increased pauses and could cause OutOfMemoryErrors if the GC was not able to keep up with the fast allocation.

      It is important to note that although the Zephyr plugin is mentioned in this ticket, the same issue can be seen with other plugins as well.

      Environment

      • JIRA 7.2.7 (server or Data Center)
      • Install a plugin that uses Lucene indexes eg: Zephyr.
      • Moderate sized to big JIRA instance 700k issues 400 custom fields.
      • Create too many search requests issued by JIRA Zephyr plugin rest API.

      Steps to Reproduce

      There is no detailed steps to easily reproduce this.

      Expected Results

      JIRA should be able to handle search requests without issues.

      Actual Results

      JIRA will handle the requests but will progressively allocate huge amounts of org.apache.lucene.search.ScoreDoc objects under org.apache.lucene.search.HitQueue which leads to increased GC pressure.
      Millions of Lucene score documents are noticed.

      Developer notes

      Please see comment in Dev community with more details covering the problem and suggesting the code changes
      how-to-avoid-out-of-memory-error-using-searchprovider

      Workaround

      Possible workarounds are:

      • Disable the offending plugin.
      • Reduce the scope of the action performed by the plugin (i.e search, data ranges etc)

              Unassigned Unassigned
              sabdelfattah Sherif Abdelfattah (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated: