XML backups cause performance problems or 'java.lang.OutOfMemoryError Java heap 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

Atlassian recommends disabling the XML backup both for performance and reliability. Setting up a test server and the Production Backup Strategy is better done with an SQL dump. Upgrading Confluence is better done without the XML backup.

The one operation for which an XML backup is required is database migration. For this we recommend a commercial database migration tool. Vote for CONF-12599 to add a more robust strategy for large implementation migrations. Atlassian does not support migrating to a new database.

Problem

  1. The system performs slowly or crashes.

  2. Other unpredictable outcomes can include failed mail or index rebuilding (including searching or Recently Updated problems).

  3. Daily XML backups fail to be created

The following appears in the atlassian-confluence.log:

Caused by: java.lang.OutOfMemoryError: Java heap space at org.postgresql.util.PGbytea.toBytes(PGbytea.java:53) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getBytes(AbstractJdbc2ResultSet.java:2271) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getBinaryStream(AbstractJdbc2ResultSet.java:2386) at com.mchange.v2.c3p0.impl.NewProxyResultSet.getBinaryStream(NewProxyResultSet.java:519) at org.springframework.jdbc.support.lob.DefaultLobHandler.getBlobAsBinaryStream(DefaultLobHandler.java:64) at org.springframework.orm.hibernate.support.BlobInputStreamType.nullSafeGetInternal(BlobInputStreamType.java:24) at org.springframework.orm.hibernate.support.SpoolingBlobInputStreamType.nullSafeGetInternal(SpoolingBlobInputStreamType.java:45) at org.springframework.orm.hibernate.support.AbstractLobType.nullSafeGet(AbstractLobType.java:137) at net.sf.hibernate.type.CustomType.nullSafeGet(CustomType.java:92)

Cause

Confluence xml backups are not recommended for production installations. The XML backup performs poorly under load and require large amounts of memory and thus do not scale.

We have included a warning in the Administration Screen:

(Auto-migrated image: description temporarily unavailable)

Resolution

Disable the XML backup from Administration >> Daily Backup Admin. Use the Production Backup Strategy instead, (your DBA and system admin is probably doing this already).

Updated on May 22, 2025

Still need help?

The Atlassian Community is here for you.