Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-25535

Performance issue and OOM with childIssuesOf() function because search stores whole Lucene documents

XMLWordPrintable

    • 8.2
    • 2
    • Severity 2 - Major
    • 45
    • Hide
      Atlassian Update – 28th Feb 2024

      Dear Customers,

      Thank you for your continued feedback on this issue. We're pleased to announce that we've made significant strides towards resolving this problem. From Jira version 9.15.0 onwards, only the issue ids will be loaded from the Lucene index when executing the childIssuesOf JQL function.

      In our internal testing, we've found that this change can reduce memory allocation by as much as 96%, and can also decrease execution time by roughly 24%. Please note that these numbers are estimates and actual results may vary depending on individual instances and usage patterns.

      We hope that this update will greatly improve the performance and stability of your Jira instance, particularly for those with larger issue sets.

      Best regards,
      Daniel Rauf
      Software Engineer

      Show
      Atlassian Update – 28th Feb 2024 Dear Customers, Thank you for your continued feedback on this issue. We're pleased to announce that we've made significant strides towards resolving this problem. From Jira version 9.15.0 onwards, only the issue ids will be loaded from the Lucene index when executing the childIssuesOf JQL function. In our internal testing, we've found that this change can reduce memory allocation by as much as 96%, and can also decrease execution time by roughly 24%. Please note that these numbers are estimates and actual results may vary depending on individual instances and usage patterns. We hope that this update will greatly improve the performance and stability of your Jira instance, particularly for those with larger issue sets. Best regards, Daniel Rauf Software Engineer

      Issue Summary

      This is reproducible on Data Center: (yes)
      When the number of children gets large and issues contain data that is heavy, calling childIssuesOf() can cause slowness or even Out Of Memory Exception.
      Slowness is caused because JVM needs to perform excessive numbers of GC activities to allocate memory for whole Lucene documents.
      If your instance is under pressure, multiple calls can even cause OOM.

      This is one of the culprits for the slowness for more see JSWSERVER-24980

      Steps to Reproduce

      1. Create 64k~ issues(dependency tree) that are connected together via Parent Link, Epic Link and Parent fields. Each issue should have a field/fields that occupy more memory for example 0.8KB/issue. This is around ~400 characters long description for each issue.
      2. Search by JQL
      issuekey in childIssuesOf(<parent-issue-key>) 

      Expected Results

      There is no significant memory footprint.

      Actual Results

      One Jira call can generate more than 500 MB of heap, which can even cause OOM.
      On the heap dump you can see many documents that are connected with childIssuesOf() function:

      Workaround

      Users may want to write new JQLs using a combination of ScriptRunner functions:

      The Jira administrator may choose to prevent the usage of this JQL function by disabling the following module of the Advanced Roadmaps plans plugin:

      • Child issues of (jpo-jql-function-recursive-children-lookup)

       
      If you'd like to follow that route, you can follow the steps below:

      1. Go to Jira administration (gear icon) > Manage Apps > Manage Apps
      2. Change the filter to "All apps".
      3. Locate and expand the "Advanced Roadmaps plans" section.
      4. Locate and turn off the "Child issues of (jpo-jql-function-recursive-children-lookup)" module.

      This is a choice between stability and feature that an admin might want to take if the childIssuesOf JQL function becomes a major problem to an instance.

              drauf Daniel Rauf
              ddudziak Stasiu
              Votes:
              5 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: