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

A large change history or worklog on an issue can cause an OOME when displaying the History tab

    XMLWordPrintable

Details

    • 6.04
    • 64
    • Severity 1 - Critical
    • 28
    • Hide
      Atlassian Update – 29 June 2022

      Hi everyone,

      From Jira 9 and onwards, this issue has been mitigated as part of Activity tabs improvements.
      This issue will not occur on initial load of any activity tab (including "History" and "Worklog" tabs), but please do note that it still can happen if users attempt to load all events at once.

      Artur Falborski,
      Software Engineer, Jira Server and Data Center

      Show
      Atlassian Update – 29 June 2022 Hi everyone, From Jira 9 and onwards, this issue has been mitigated as part of Activity tabs improvements. This issue will not occur on initial load of any activity tab (including "History" and "Worklog" tabs), but please do note that it still can happen if users attempt to load all events at once. Artur Falborski, Software Engineer, Jira Server and Data Center

    Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Summary

      Having a huge amount of changeitems and changegroups (20,000) will cause the instance to OOME when viewing the History tab.

      Steps to Reproduce

      1. Create a change log of over 20,000 entries for one issue.
      2. View the issue history tab for that issue.

      Expected Results

      Full change log should be displayed.

      Actual Results

      The instance will be out of memory and restart.

      Notes

      • SQL to find large number of changes per issue:
        select concat(p.pkey,'-',ji.issuenum) as issue, count (ji.id) from changeitem ci join changegroup cg on cg.id = ci.groupid join jiraissue ji on cg.issueid = ji.id join project p on p.id = ji.project group by ji.issuenum,p.pkey order by count (ji.id) DESC;
           issue    | count
        ------------+-------
         PRG-5      |    50
         AG-4       |    17
         AG-12      |    14
         AG-16      |    13
        
      • SQL to find large number of actions (comments ... ) per issue:
        select concat(p.pkey,'-',i.issuenum) as issue, count(i.id) from jiraaction a, jiraissue i, project p where i.project = p.id and i.id = a.issueid group by p.pkey,i.issuenum order by count (i.id) DESC;
        
      • SQL to identify issues with large worklog history:
        select issueid, count(id) from worklog group by issueid having count(id) > 100 order by (count(id)) desc;
        

      Workaround

      Using the queries above, we can identify the issues with large changeitems and changegroups information.

      Next, clone the issue on the list as the case history is not cloned to the new issue.

      Attachments

        Issue Links

          Activity

            People

              d996197e70d9 Artur Falborski
              mariffin Mohamed Hazwan Ariffin (Inactive)
              Votes:
              30 Vote for this issue
              Watchers:
              50 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: