-
Bug
-
Resolution: Fixed
-
Highest
-
9.2.4, 8.5.22
-
24
-
Severity 2 - Major
-
211
-
Issue Summary
Confluence can encounter OOM issue intermittently due to Hibernate L2 cache i.e com.hazelcast.hibernate.local.LocalRegionCache
Steps to Reproduce
- Setup Confluence cluster environment with example site.
- As part of dashboard, add few macros such as Recently updated, Blogpost etc.
- Create about 10 different spaces with some content( or copy the content from example dashboard page including child)
- Create about 10 different users and then try to login using these users.
With these steps, you wont see any difference but as part of JVM heap usage, we now have cached the query(around space view permissions) and results for these 10 users. This can be verified from the heap dump.
Now let's consider the same case for an environment where we have about more than 3K users logging in across a day and we have more than 30k spaces across the environment. Since the data set(space results) that we are caching is huge and so for each user, we end up with using about (1-8MB) of heap space. Considering that we have about 3K users logging in, this means that we need at least around (3GB to 24GB) of memory to cater to this result set alone and this can vary further, if we have more users logging in for a specific day. Based on heap size configured, this can surely impact Confluence workflows and can cause OOM issues
Expected Results
Confluence should make optimum use of L2 cache so as not to cause OOM issues.
Actual Results
Confluence encounters OOM issue due to really large data set occupied under L2 cache which is linked to View Space Permission query -
select distinct space0_.SPACEKEY as col_0_0_, case when denormalis1_.SPACE_ID is null then 0 else 1 end as col_1_0_ from SPACES space0_ left outer join DENORMALISED_SPACE_VIEW_PERMISSIONS denormalis1_ on (space0_.SPACEID=denormalis1_.SPACE_ID and (SID_ID in (? , ? , ? , ?)))
The below exception is thrown in the catalina.out file:
java.lang.OutOfMemoryError: Java heap space
Workaround
- Increase configured heap size to larger size so as to accommodate these results if the issue being encountered is really less frequent. Increased heap size will help provide some more resilience around it. FYIP, this does not guarantee that this cannot be encountered again.
OR - Disable faster permissions only under the scenario where this is happening too frequently so as to bring stability to the environment. There is a possibility that this may impact Confluence, so use this with caution.
- relates to
-
CONFSERVER-81037 Clicking inline tasks on large pages slowly fills the heap over time
-
- Gathering Impact
-
-
PSR-1064 Loading...
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...