Migrating attachments from database to file system fails with transaction log full exception

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 migrating attachments from database to file system, the migration fails.

The following appears in the atlassian-confluence.log

1 2 3 4 5 6 7 8 9 10 11 12 13 14 2015-10-01 17:37:19,939 ERROR [Long running task: Attachment data migration] [confluence.util.longrunning.AttachmentMigrationLongRunningTask] runInternal There was a problem removing all records in the AttachmentData table, while performing a migration task. -- url: /admin/doattachmentmigration.action | userName: admin | referer: http://<confluence-base-url>/admin/doeditattachmentstorage.action | action: doattachmentmigration java.lang.RuntimeException: There was a problem removing all records in the AttachmentData table, while performing a migration task. at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAttachmentDataDao.clearAttachmentDataTable(HibernateAttachmentDataDao.java:366) ... Caused by: org.springframework.dao.TransientDataAccessResourceException: StatementCallback; SQL [DELETE FROM ATTACHMENTDATA]; The transaction log for database '<database-name>' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases; nested exception is java.sql.SQLException: The transaction log for database 'confluencedb' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:106) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) ... Caused by: java.sql.SQLException: The transaction log for database '<database-name>' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)

Cause

The transaction log is set at a specific size and is unable to expand as needed.

Resolution

Setting the transaction log to have an auto-growth option instead of 'NONE' should resolve the issue. You may also need to set a larger initial size.

Please see this support article from Microsoft for more information on tweaking this setting. Also see Troubleshoot a Full Transaction Log from Microsoft for more information on troubleshooting.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.