Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-67211

Jira automated backup might cause OutOfMemoryError due to large dataset

XMLWordPrintable

    • 6.03
    • 65
    • Severity 2 - Major
    • 50
    • Hide
      Atlassian Update – 24 Jun 2025

      Dear Customers,
      Thank you for taking the time to file and comment on this issue. 

      We have run extensive tests in house to investigate the memory management issue during xml backups, and have found no evidence of such behaviour on the latest Jira versions. The reports of the behaviour described in this ticket come from versions of Jira that are no longer supported, and current versions of Jira are far more scalable than it used to be all these years ago.

      The best way for Atlassian to investigate any "out of memory" problems in Jira is to send our support engineers memory diagnostics collected when the event is occurring. And the best way to collect that is to run Jira process with "-XX:+HeapDumpOnOutOfMemoryError" parameter. More details on that can be found in this article.

      Should you encounter this or similar issue on a modern version of Jira, please don't hesitate to contact Atlassian support and we will gladly investigate your particular case in detail.

       

      Thanks,
      Bart
      Jira dev Team

      Show
      Atlassian Update – 24 Jun 2025 Dear Customers, Thank you for taking the time to file and comment on this issue.  We have run extensive tests in house to investigate the memory management issue during xml backups, and have found no evidence of such behaviour on the latest Jira versions. The reports of the behaviour described in this ticket come from versions of Jira that are no longer supported, and current versions of Jira are far more scalable than it used to be all these years ago. The best way for Atlassian to investigate any "out of memory" problems in Jira is to send our support engineers memory diagnostics collected when the event is occurring. And the best way to collect that is to run Jira process with "-XX:+HeapDumpOnOutOfMemoryError" parameter. More details on that can be found in  this article . Should you encounter this or similar issue on a modern version of Jira, please don't hesitate to contact Atlassian support and we will gladly investigate your particular case in detail.   Thanks, Bart Jira dev Team

      Summary

      Jira automated backup might cause OutOfMemoryError (OOM) due to large dataset generated during export.

      Note

      For production use or large JIRA application installations, it is strongly recommended that you use native database-specific tools instead of the XML backup service. XML backups are not guaranteed to be consistent, as the database may be updated during the backup process. Inconsistent backups are created successfully without any warnings or error messages, but fail during the restore process. Database-native tools offer a much more consistent and reliable means of storing data.

      Steps to Reproduce

      1. Run Backup service and export data into xml.

      Expected Results

      System is stable

      Actual Results

      Jira has memory pressure which causes poor performance or leads to OutOfMemoryError.
      The below exception is thrown in the atlassian-jira.log file:

      2018-04-17 01:02:10,461 Caesium-1-4 ERROR anonymous    Backup Service [c.a.j.bc.dataimport.DefaultExportService] Error during Active Objects Backup
      com.atlassian.activeobjects.spi.ActiveObjectsImportExportException: There was an error during import/export with <unknown plugin>:
              at com.atlassian.activeobjects.backup.ImportExportErrorServiceImpl.newImportExportSqlException(ImportExportErrorServiceImpl.java:26)
              at com.atlassian.dbexporter.jdbc.JdbcUtils.withNoAutoCommit(JdbcUtils.java:57)
              at com.atlassian.dbexporter.exporter.DataExporter$1.call(DataExporter.java:52)
              at com.atlassian.dbexporter.exporter.DataExporter$1.call(DataExporter.java:49)
              at com.atlassian.dbexporter.jdbc.JdbcUtils.withConnection(JdbcUtils.java:28)
              at com.atlassian.dbexporter.exporter.DataExporter.export(DataExporter.java:49)
              at com.atlassian.dbexporter.DbExporter.exportData(DbExporter.java:49)
              at com.atlassian.activeobjects.backup.ActiveObjectsBackup.save(ActiveObjectsBackup.java:110)
              at com.atlassian.jira.bc.dataimport.DefaultExportService.exportActiveObjects(DefaultExportService.java:184)
      ...
      Caused by: java.lang.OutOfMemoryError: Java heap space
              at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3512)
              at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3459)
      

      Notes

      Workaround

      Delete Backup service, see docs: Automating JIRA application backups

              bornatowski Bartosz Ornatowski
              ayakovlev@atlassian.com Andriy Yakovlev [Atlassian]
              Votes:
              10 Vote for this issue
              Watchers:
              34 Start watching this issue

                Created:
                Updated:
                Resolved: