Confluence crashes due to OutOfMemoryError Metaspace
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Confluence crashes after upgrading to Confluence 5.7.x (or above) and using JAVA 8.
The following appears in the atlassian-confluence.log
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.
Resolution
- Remove the
-XX:MaxMetaspaceSize=256m
argument in system properties (see Configuring System Properties). Future versions of Confluence will not set this argument per CONF-37925 - Getting issue details... STATUS