Jira XML backups may fail with a 'Connection has already been closed' error

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

Problem

When creating XML backups of large Jira instances, the backup may fail after a few minutes with the following UI error:

(Auto-migrated image: description temporarily unavailable)

The following exception can also be observed in atlassian-jira.log:

1 2 3 4 5 6 7 8 9 10 org.ofbiz.core.entity.GenericTransactionException: Error occurred while rolling back transaction. (Connection has already been closed.) at org.ofbiz.core.entity.TransactionUtil.rollbackLocalTransaction(TransactionUtil.java:397) at com.atlassian.core.ofbiz.util.CoreTransactionUtil.rollback(CoreTransactionUtil.java:47) at com.atlassian.jira.action.admin.export.DefaultSaxEntitiesExporter.cleanUpAfterEntity(DefaultSaxEntitiesExporter.java:167) at com.atlassian.jira.action.admin.export.DefaultSaxEntitiesExporter.exportEntity(DefaultSaxEntitiesExporter.java:145) at com.atlassian.jira.action.admin.export.DefaultSaxEntitiesExporter.exportEntities(DefaultSaxEntitiesExporter.java:100) at com.atlassian.jira.bc.dataimport.DefaultExportService.exportJIRA(DefaultExportService.java:172) at com.atlassian.jira.bc.dataimport.DefaultExportService.export(DefaultExportService.java:82) at com.atlassian.jira.bc.dataimport.DefaultExportService.export(DefaultExportService.java:67) at com.atlassian.jira.web.action.util.XmlBackup.doExecute(XmlBackup.java:100)

Cause

The backup is taking longer than the specified 'pool-remove-abandoned-timeout' JDBC value in dbconfig.xml, or the 'removeAbandonedTimeout' value in server.xml (if using a JNDI connection). The value defaults to 300 seconds.

Resolution

Make a note of the amount of time it takes before the UI error is observed (ie. how long it takes after you initiate the XML backup and the error to appear on the Jira UI), and then increase the specified timeout to exceed that by 20 to 30 seconds to account for variability. As an example, if the backup takes 6 minutes, increase the timeout value to a minimum of 400 seconds.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.