Confluence crashes due to OutOfMemoryError Metaspace

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

Summary

Problem

Confluence crashes after upgrading to Confluence 5.7.x (or above) and using JAVA 8.

The following appears in the atlassian-confluence.log

1 2 3 4 5 6 7 2015-06-10 10:02:05,782 ERROR [scheduler_Worker-10] [org.quartz.core.ErrorLogger] schedulerError Job (DEFAULT.IndexQueueFlusher threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.OutOfMemoryError: Metaspace] at org.quartz.core.JobRunShell.run(JobRunShell.java:234) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool.lambda$runInThread$46(ConfluenceQuartzThreadPool.java:19) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$$Lambda$91/1891777742.run(Unknown Source) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: java.lang.OutOfMemoryError: Metaspace

Diagnosis

Environment

  • Confluence is running on JAVA 8

Cause

-XX:MaxMetaspaceSize limits the maximum size of Memory allocation. Confluence has exceeded this fixed block for loading class files.

Solution

Resolution

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.