Confluence crashes due to OutOfMemoryError PermGen space

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

An error like the following occurs. It could be any module, the Quartz Scheduler is an example.

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 How to fix out of memory errors by increasing available memory. 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.

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.