Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-69138

Atlassian Diagnostics bundled plugin high memory usage

    XMLWordPrintable

    Details

      Description

      Issue Summary

      DailyAlertAnalyticsJob is a part of Atlassian Diagnostics integration plugin.
      Its responsibility is to produce daily analytics summary on all alerts fired with Atlassian diagnostics framework.

      Its memory usage can get quite heavy with lots of alerts fired daily. Memory will be accumulated in Caesium-x-y thread

      Expected Results

      DailyAlertAnalyticsJob efficiently handles its memory footprint by properly streaming alerts instead of loading all into memory.

      Actual Results

      DailyAlertAnalyticsJob loads all alerts from a given day into memory causing high pressure on GC, eventually leading to OOMe on big instances.

      Workaround

      Option 1 - recommended

      Alerting thresholds are set by several application properties.
      Setting them high enough to produce less alerts per day is a viable workaround for the issue.

      Currently implemented alerting thresholds:

      Property Default value Explanation
      jira.diagnostics.thresholds.slow-query-millis 400 ms Alert for slow JQL query
      jira.diagnostics.thresholds.number-of-results 1000 Number of returned issues from a single JQL query
      jira.diagnostics.thresholds.query-complexity 1000 Lucene query complexity - number of claues the query is constructed of

      Setting these values high can reduce the number of alerts triggered daily.

      • These values can be modified either from the $JIRA_HOME/jira-config.properties. For example,
        jira.diagnostics.thresholds.slow-query-millis=5000 
        jira.diagnostics.thresholds.number-of-results=10000 
        
      • Or they can be modified using the following JVM parameters,
        -Djira.diagnostics.thresholds.slow-query-millis=5000 
        -Djira.diagnostics.thresholds.number-of-results=10000  
        

        Make sure there is no space between the equal sign in both methods.

      Option 2
 - recommended

      Retention period for alerts is 30 days by default. You can decrease database size by changing it to e.g. 1 day.

       In order to do that you please use the Jira property com.atlassian.jira.health.diagnostics.alerts.retention-period-days

      Option 3

      You can temporary disable the plugin via UPM. However we do not recommend disabling it as problems with Diagnostics could be only a symptom of underlying root cause (it might be harder to track without Diagnostics plugin).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dwlizlo Dawid Wlizlo
              Reporter:
              tzwierzchowski Tomasz Zwierzchowski
              Votes:
              24 Vote for this issue
              Watchers:
              54 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: