When migrating from database to file system storage for attachments, Confluence appears to hang
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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 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
.
Workaround
Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
- Shut down Confluence, and take a full database backup
- If a long running DELETE query is running in your database, use your administrative tools to stop it
Execute the following SQL:
TRUNCATE TABLE ATTACHMENTDATA
- Start Confluence again
Resolution
Wait for the process to complete.