Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-99809

Confluence OOM/High CPU usage issue(typically encountered where pages with lots of versions come into play) due to Activity streams gadgets request from Jira

XMLWordPrintable

      Issue Summary

      Confluence instance can run into OOM issue or can encounter high CPU usage issue for the Activity streams requests received from Jira. This typically would happen when user activity under Confluence involves pages that has lots of versions.

      Steps to Reproduce

      1. Create same set of users(2-4) within Confluence and Jira and connect these products with application links.
      2. Under Confluence, add 10 pages at least with large content. Page should have more than 100 mins read time.
      3. Create more than 500 versions of each of these pages.
      4. Each user should then edit these 10 pages.
      5. Configure activity stream gadgets as part of Jira user's dashboard.
      6. Now try to login into Jira simultaneously with these users.

      Expected Results

      • Activity streams gadgets requests should not cause instance instability for Confluence.

      Actual Results

      Confluence while processing these activity streams requests , tries and pull up the last version of the page to get differences but internally hibernate loads all the page versions to memory. This causes sudden spike in Confluence heap memory usage while processing these requests. So if the number of requests, coupled with page size(huge) and page versions(too many), are really large, this can cause Confluence to run into OOM issues.

      Even in a scenario, where the node does not directly hit into OOM issue at first, Confluence heap usage will increase and will keep rising further(based on cache configuration) since Confluence pushes these pages to L2 cache as well. Due to this, L2 cache i.e com.hazelcast.hibernate.local.LocalRegionCache size will keep on increasing and can further cause OOM issues with such heavy activity.

      Under catalina.out, we can observe below -

      java.lang.OutOfMemoryError: Java heap space
      

      In addition to above, since this is async workflow between Confluence and Jira, so Confluence would end up processing request similar to below -

      <BASE-URL>/activity?use-accept-lang=true&streams=user+IS+user1&authOnly=true&local=true&maxResults=10&os_authType=basic 
      

      Workaround

      Use retention rules to remove older version of pages.

              5339cdd01cf4 Jeffery Xie
              02495d088b9f Saurabh Bhatia
              Votes:
              5 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: