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

From Confluence 5.6 onwards it is not possible to override JVM settings via environment variables

    XMLWordPrintable

Details

    Description

      But this was perfectly possible before. Of course you still can modify the distributed setenv.sh file but that is definitely not very nice and does not make deploying a new version any easier.

      In 5.5 and previous, setenv.sh reads

      JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxPermSize=256m $JAVA_OPTS -Djava.awt.headless=true "
      export JAVA_OPTS
      

      So this allows to override any default settings by supplying a previous JAVA_OPTS, no changes to the script required.

      However now in 5.6

      # Set the JVM arguments used to start Confluence. For a description of the options, see
      # http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
      CATALINA_OPTS="$CATALINA_OPTS -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -XX:+UseG1GC"
      CATALINA_OPTS="$CATALINA_OPTS -Djava.awt.headless=true"
      CATALINA_OPTS="$CATALINA_OPTS -Xloggc:$LOGBASEABS/logs/gc-`date +%F_%T`.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M"
      CATALINA_OPTS="$CATALINA_OPTS -XX:-PrintGCDetails -XX:+PrintGCTimeStamps -XX:-PrintTenuringDistribution"
      export CATALINA_OPTS
      

      It is impossible to override any default settings already specified, as anything one could set in CATALINA_OPTS is followed by the default options. Not good.

      Please do move the default CATALINA_OPTS to the end, so they can effectively override default values.

      Attachments

        Issue Links

          Activity

            People

              drizzuto David Rizzuto
              17258ffad35a Daniel Varela Santoalla
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: