Confluence crashes due to OutOfMemoryError PermGen space
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
An error like the following occurs. It could be any module, the Quartz Scheduler is an example.
1
2
3
4
Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread" java.lang.OutOfMemoryError: PermGen space
Exception in thread "http-80-Processor1" java.lang.OutOfMemoryError: PermGen space
Exception in thread "http-80-Processor2" java.lang.OutOfMemoryError: PermGen space
Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1" java.lang.OutOfMemoryError: PermGen space
Cause
If you get the error message: java.lang.OutOfMemoryError: PermGen space
this means that you have exceeded Java's fixed block for loading class files. Permanent Generation Memory, unlike Java heap space, is the memory allocation for the classes themselves as opposed to the objects created. The addition of more plugins contributes to more consumption of PermGen space. The error occurs when enough classes are invoked.
Resolution
This is only relevant for Confluence 5.7 and below as Java 8 manages PermGen automatically.
To avoid this in the future follow the steps detailed in the guide Fix java.lang.OutOfMemoryError in Confluence. Find the instructions on how to increase the Permanent Generation Space. Make sure to change -XX:MaxPermSize rather than the Heap Space Parameters.
Confluence doesn't require a huge amount of PermGen memory, so if you find that you need to increase it to more than 512MB this could indicate a problem with either the application or an installed addon.
Was this helpful?