Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-61415

Java 11 Garbage Collection Logging Settings Are Not Correctly Applied on Confluence Start

      Issue Summary

      The default garbage collection configuration for Confluence running Java 11 is incorrectly applied resulting in unexpected logging formats.

      Steps to Reproduce

      1. Make a change to setenv.sh with new Java 11 garbage collection logging configuration
      2. Start Confluence
      3. Check Garbage Collection logging

      Expected Results

      The new garbage collection configuration is reflected in the logging.

      Actual Results

      The default garbage collection settings for Java are reflected in the logs

      Cause

      Java 8 and prior used the -Xloggc: syntax for formatting garbage collection log locations. With the introduction of Java 11, the syntax was moved to -Xlog:gc (note the moved colon). In order to maintain some backwards compatibility, the -Xloggc: syntax was remapped to the default Java 11 configuration. This configuration overrides anything else configured with the new syntax.

      Details of this change are briefly mentioned at https://bugs.openjdk.java.net/browse/JDK-8170636

      Workaround

      Confluence Version 7.11.latest and Earlier

      Remove the old Java 8 garbage collection configuration which by default is

      Java 8 Garbage Collection Configuration
      CATALINA_OPTS="-Xloggc:$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M ${CATALINA_OPTS}"
      

      Add the following in place

      Java 11 Garbage Collection Configuration
      CATALINA_OPTS="-Xlog:gc*:file=$LOGBASEABS/logs/gc-%t.log:tags,time,uptime,level:filecount=5,filesize=2M ${CATALINA_OPTS}"
      

      Confluence Version 7.12.0 and Later

      Comment out the old Java 8 garbage collection configuration which by default is

      Java 8 Garbage Collection Configuration
      CATALINA_OPTS="-Xloggc:$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M ${CATALINA_OPTS}"
      

            [CONFSERVER-61415] Java 11 Garbage Collection Logging Settings Are Not Correctly Applied on Confluence Start

            Conny Postma made changes -
            Remote Link Original: This issue links to "Page (Atlassian Documentation)" [ 571867 ]
            Lei Wang made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 813487 ]
            Marcio Ribeiro (Inactive) made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 763394 ]
            Marcio Ribeiro (Inactive) made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 755810 ]
            Mohit Sharma made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 716348 ]
            James Whitehead made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            SET Analytics Bot made changes -
            UIS Original: 32 New: 70
            SET Analytics Bot made changes -
            UIS Original: 26 New: 32
            SET Analytics Bot made changes -
            Support reference count Original: 17 New: 18
            James Whitehead made changes -
            Link New: This issue relates to CONFSERVER-79961 [ CONFSERVER-79961 ]

              Unassigned Unassigned
              jponting James Ponting
              Affected customers:
              10 This affects my team
              Watchers:
              21 Start watching this issue

                Created:
                Updated:
                Resolved: