-
Bug
-
Resolution: Fixed
-
Medium
-
8.5.0, 9.2.0
-
7
-
Severity 3 - Minor
-
47
-
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
- Create same set of users(2-4) within Confluence and Jira and connect these products with application links.
- Under Confluence, add 10 pages at least with large content. Page should have more than 100 mins read time.
- Create more than 500 versions of each of these pages.
- Each user should then edit these 10 pages.
- Configure activity stream gadgets as part of Jira user's dashboard.
- 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.