How to reduce the size of Synchrony tables

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

From Confluence 6.0 to 6.15, Synchrony tables are append-only. As the tables increase in size they may become too large for some databases. There are also cases where content reconciliation may fail and it is not possible to publish new content.

Note: In Confluence 7.0 and later, two scheduled jobs are available to evict Synchrony data on a regular basis. See How to remove Synchrony data for more information.

Solution

The Synchrony tables can be truncated to resolve the issue.

Please note that turning Collaborative editing OFF and ON again may remove any unsaved drafts that were not synchronized between Confluence and Synchrony tables. You may refer to this page - How Do Drafts Work on Confluence for detailed information regarding drafts. Please carefully follow the steps below to avoid that situation.

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. To avoid losing unsaved changes, take one of the actions below during a maintenance window:

    1. Have the users publish or discard the changes on the editor before the maintenance, or

    2. Put Confluence on read-only mode, or

    3. Remove Confluence from the Load Balancer or Reverse proxy to avoid users accessing the application and making changes (recommended approach)

  2. Since contents from active editor sessions are synchronized between Confluence and Synchrony tables every 30 seconds, wait for a few minutes to allow this sync to finish

  3. Turn OFF Collaborative Editing

  4. Stop Confluence

  5. Truncate the tables:

    ⚠️ Don't do this while collaborative editing is on

    1 2 3 TRUNCATE TABLE "EVENTS"; TRUNCATE TABLE "SECRETS"; TRUNCATE TABLE "SNAPSHOTS";
  6. If running Confluence with MS SQL Server, consider shrinking the database file to recoup disk space.

  7. Start Confluence

  8. Turn ON collaborative editing.

The strategy of removing access to the application and waiting a few minutes should be enough to have the data in the tables above synchronized with the Confluence tables (CONTENT and BODYCONTENT). With copies of the drafts saved, it is safe to clean the Synchrony tables. Also, it is important to stop Confluence as well because any change outside the editor also affects those tables. Marking tasks as completed and adding inline comments are examples of such actions.

In the event that you skip one of the steps above and end up losing any draft changes, use the following KB to recover them from the database backup:

Updated on April 24, 2025

Still need help?

The Atlassian Community is here for you.