How to Enable Garbage Collection (GC) Logging for Synchrony process

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

Staring in Confluence 7.20, if Synchrony is managed by Confluence (the most common setup), you can make changes to Synchrony JVM flags by updating:

  • <CONFLUENCE_HOME>/synchrony-args.properties (for Confluence Server); or

  • <CONFLUENCE_SHARED_HOME>/synchrony-args.properties (for Confluence Data Center environment)

This new feature was introduced by the implementation of CONFSERVER-53548 Allow GC Logging or Java agent configuration for Synchrony

The following instructions are applicable for JDK8 and JDK11/17, depending on the version used by your Confluence instance.

Solution

Linux

To configure Synchrony JVM arguments in Linux installations:

  1. Edit the relevant synchrony-args.properties file (see above)

  2. Add in these lines (substitute both <CONFLUENCE_INSTALL> with the actual Confluence Install Directory):

    When running Confluence with JDK 8

    1 2 3 4 5 6 synchrony.jvm.arg.0=-XX:+IgnoreUnrecognizedVMOptions synchrony.jvm.arg.1=-Xlog:gc+age=debug:file=<CONFLUENCE_INSTALL>/logs/synchrony-gc-%t.log:filecount=5,filesize=2M synchrony.jvm.arg.2=-Xloggc:<CONFLUENCE_INSTALL_DIR>/logs/synchrony-gc-%t.log synchrony.jvm.arg.3=-XX:+UseGCLogFileRotation synchrony.jvm.arg.4=-XX:NumberOfGCLogFiles=5 synchrony.jvm.arg.5=-XX:GCLogFileSize=2M

    Example

    1 2 3 4 5 6 synchrony.jvm.arg.0=-XX:+IgnoreUnrecognizedVMOptions synchrony.jvm.arg.1=-Xlog:gc+age=debug:file=/opt/atlassian/confluence/logs/synchrony-gc-%t.log:filecount=5,filesize=2M synchrony.jvm.arg.2=-Xloggc:/opt/atlassian/confluence/logs/synchrony-gc-%t.log synchrony.jvm.arg.3=-XX:+UseGCLogFileRotation synchrony.jvm.arg.4=-XX:NumberOfGCLogFiles=5 synchrony.jvm.arg.5=-XX:GCLogFileSize=2M

    When running Confluence with JDK 11/17

    1 synchrony.jvm.arg.0=-Xlog:gc*:file=<CONFLUENCE_INSTALL>/logs/synchrony-gc-%t.log:tags,time,uptime,level:filecount=5,filesize=2M

    Example

    1 synchrony.jvm.arg.0=-Xlog:gc*:file=/opt/atlassian/confluence/logs/synchrony-gc-%t.log:tags,time,uptime,level:filecount=5,filesize=2M
  3. Navigate to Confluence Administration » General Configuration » Collaborative Editing

  4. Click Restart Synchrony

  5. Check that the <CONFLUENCE_INSTALL>/logs contains newly created synchrony-gc-* files

ℹ️ If Confluence is running in a Cluster, you will need to restart Synchrony process on each Node (one at a time).

Windows

To configure Synchrony JVM arguments in Windows installations:

  1. Edit the relevant synchrony-args.properties file (see above)

  2. Add in these lines (substitute both <CONFLUENCE_INSTALL> with the actual Confluence Install Directory):

    When running Confluence with JDK 8

    1 2 3 4 5 6 synchrony.jvm.arg.0=-XX:+IgnoreUnrecognizedVMOptions synchrony.jvm.arg.1=-Xlog:gc+age=debug:file=<CONFLUENCE_INSTALL>\\logs\\synchrony-gc-%t.log:filecount=5,filesize=2M synchrony.jvm.arg.2=-Xloggc:<CONFLUENCE_INSTALL_DIR>\\logs\\synchrony-gc-%t.log synchrony.jvm.arg.3=-XX:+UseGCLogFileRotation synchrony.jvm.arg.4=-XX:NumberOfGCLogFiles=5 synchrony.jvm.arg.5=-XX:GCLogFileSize=2M

    Example

    1 2 3 4 5 6 synchrony.jvm.arg.0=-XX:+IgnoreUnrecognizedVMOptions synchrony.jvm.arg.1=-Xlog:gc+age=debug:file=C:\\Program Files\\Atlassian\\Confluence\\logs\\synchrony-gc-%t.log:filecount=5,filesize=2M synchrony.jvm.arg.2=-Xloggc:C:\\Program Files\\Atlassian\\Confluence\\logs\\synchrony-gc-%t.log synchrony.jvm.arg.3=-XX:+UseGCLogFileRotation synchrony.jvm.arg.4=-XX:NumberOfGCLogFiles=5 synchrony.jvm.arg.5=-XX:GCLogFileSize=2M

    ⚠️ Escape backslashes by using two backslashes as above example

    ⚠️ Do not use forward slashes (i.e. / ) for the path on Windows

    ⚠️ Do not use double quotes for the path

    When running Confluence with JDK 11/17

    1 synchrony.jvm.arg.0=-Xlog:gc*:file=<CONFLUENCE_INSTALL_DIR>\\logs\\synchrony-gc-%t.log:tags,time,uptime,level:filecount=5,filesize=2M

    Example

    1 synchrony.jvm.arg.0=-Xlog:gc*:file=C:\\Program Files\\Atlassian\\Confluence\\logs\\synchrony-gc-%t.log:tags,time,uptime,level:filecount=5,filesize=2M

    ⚠️ Escape backslashes by using two backslashes as above example

    ⚠️ Do not use forward slashes (i.e. / ) for the path on Windows

    ⚠️ Do not use double quotes for the path

  3. Navigate to Confluence Administration » General Configuration » Collaborative Editing

  4. Click Restart Synchrony

  5. Check that the <CONFLUENCE_INSTALL>\logs contains newly created synchrony-gc-* files

ℹ️ If Confluence is running in a Cluster, you will need to restart Synchrony process on each Node (one at a time).

Differences between JDK 8 and JDK11/17

For further information about the different GC configuration between JDK8 and JDK11/17, please check our KB Unrecognized JVM GC options when using JDK 11/17

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.