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

As an admin, I want date timestamps in Garbage Collection Logging to be enabled by default

    XMLWordPrintable

Details

    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Problem Definition

      The default Java 11 Garbage Collection Logging settings do not specify any custom sets of decorators.

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

      As a result, default decorators would then be used - uptime, level, and tags. Please refer to the sample GC log snippet below:

      ...
      [1.374s][debug][gc,age] GC(0) Desired survivor size 3670016 bytes, new threshold 15 (max threshold 15)
      [1.583s][debug][gc,age] GC(1) Desired survivor size 3670016 bytes, new threshold 1 (max threshold 15)
      [2.020s][debug][gc,age] GC(2) Desired survivor size 17825792 bytes, new threshold 15 (max threshold 15)
      [2.767s][debug][gc,age] GC(4) Desired survivor size 18350080 bytes, new threshold 15 (max threshold 15)
      [4.238s][debug][gc,age] GC(5) Desired survivor size 22020096 bytes, new threshold 15 (max threshold 15)
      ...
      

      Suggested Solution

      To specify a set of decorators in the default Confluence's GC logging as well as to add time decorator, to show current time and date in ISO-8601 format.
      This would be very helpful in troubleshooting performance related issues in Confluence.

      Workaround

      Modify the <Confluence-Installation>/bin/setenv.sh file as follow:

      From:
      CATALINA_OPTS="-Xlog:gc+age=debug:file=$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log::filecount=5,filesize=2M ${CATALINA_OPTS}"
      
      To:
      CATALINA_OPTS="-Xlog:gc*:file=$LOGBASEABS/logs/gc-%t.log:tags,time,uptime,level:filecount=5,filesize=2M ${CATALINA_OPTS}"
      

      Attachments

        Issue Links

          Activity

            People

              ablekhman@atlassian.com Alex Blekhman
              lrura Lauretha Rura
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: