When migrating from database to file system storage for attachments, Confluence appears to hang

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

Summary

Problem

When migrating from Database Attachment Storage to Filesystem Attachment storage, you may notice that the progress bar will hang at 99% or 100; with no error message in the logs.

Diagnosis

Check the Disk IO and CPU activity of Confluence and your Database Process - if Confluence is idle, and the database is experiencing activity, Confluence is likely removing data from the attachments table. Depending on the number of attachments, this process may take a while.

Cause

After Confluence extracts the binary information from the attachment data in the database, it will delete the contents of the attachmentdata table with the query DELETE FROM ATTACHMENTDATA.

Solution

Workaround

Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  1. Shut down Confluence, and take a full database backup

  2. If a long running DELETE query is running in your database, use your administrative tools to stop it

  3. Execute the following SQL:

    1 TRUNCATE TABLE ATTACHMENTDATA
  4. Start Confluence again

Resolution

Wait for the process to complete.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.