Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-30188

Enable Garbage Collection logging as a default with new JIRA installations



    • We collect Jira 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.


      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      Support deals with a considerable number of performance cases, and often for those we'll need to get a customer to enable GC logging and then generate and send us a Support Zip, or a compressed folder of their logs. This can often add another step for the customer to both enable GC logging and then wait for the problem to replicate itself. Sometimes this can take days, and meanwhile the customers instance is not in the best state. If they had GC logs enabled by default, when submitting that ZIP we'd have them straight away and can analyse them immediately. This would be a huge win for helping us make our customers awesome.

      The current setenv.sh & setenv.bat files have the below arguments set in them:


      However this by itself will not provide helpful logs, we really need the following as well, as in the Garbage Collection Performance Problems KB:

      -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -verbose:gc -Xloggc:/var/atlassian/application-data/jira/log/atlassian-jira-gc.log

      That directory will vary depending on where JIRA has been installed as well, ideally if we could set it with an environment variable or hardcode it based on the installed / changes to $JIRA_HOME, that would be amazing.

      If you could add log rotation to those logs as well that would be AWESOME.


      JDK 7 includes automatic GC log rotation options. More in http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html

      Enabled GC log rotation, requires -Xloggc.
      -XX:NumberOfGCLogFiles =1
      Set the number of files to use when rotating logs, must be >= 1. The rotated log files will use the following naming scheme, <filename>.0, <filename>.1, ..., <filename>.n-1.

      The size of the log file at which point the log will be rotated, must be >= 8K.


        Issue Links



              ialexeyenko Ignat (Inactive)
              dcurrie@atlassian.com Dave C
              26 Vote for this issue
              21 Start watching this issue