Uploaded image for project: 'Confluence Server and Data Center'
  1. Confluence Server and Data Center
  2. CONFSERVER-53524

Service.sh and setenv.bat files set different Java options

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress (View Workflow)
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 6.1.1, 6.3.2, 6.4.0, 6.10.0, 7.11.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      Summary

      The service.bat file that's used for creating the Windows service for Confluence sets different Java options than the setenv.bat file:

      Options in common

      -XX:+UseG1GC
      -XX:-PrintGCDetails
      -XX:-PrintTenuringDistribution
      -XX:+UseGCLogFileRotation
      -XX:NumberOfGCLogFiles=5
      -XX:GCLogFileSize=2M
      -Xloggc:%CATALINA_HOME%/logs/gc-%%t.log
      -Djava.awt.headless=true
      -Datlassian.plugins.enable.wait=300
      

      Options set by service.bat

      -Dcatalina.home=%CATALINA_HOME%
      -XX:+PrintGCTimeStamps
      -Dcatalina.base=%CATALINA_BASE%
      -Djava.endorsed.dirs=%CATALINA_HOME%\endorsed
      -Djava.io.tmpdir=%CATALINA_BASE%\temp
      -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
      -Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties
      

      Options set by setenv.bat

      -XX:+PrintGCDateStamps 
      -XX:G1ReservePercent=20
      -Xms1024m 
      -Xmx1024m 
      -Dsynchrony.enable.xhr.fallback=true
      -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768
      %START_CONFLUENCE_JAVA_OPTS%
      -Dconfluence.context.path=%CONFLUENCE_CONTEXT_PATH%
      

      The START_CONFLUENCE_JAVA_OPTIONS set in setenv.bat is probably not needed in service.bat since it's used for starting Confluence in safe mode, but the ones relating to Synchrony should be included in service.bat.

      Note

      We've undertaken some work to improve on this issue in 7.12.0.

      The service.bat file now implements all of the same configurations as the setenv.sh and setenv.bat files, except for

      So with the release of 7.12.0, most of this issue is fixed, but there's some more to go. We additionally want to look at having the service.bat file inherit its configuration from setenv.bat to simplify the process of installing Confluence on Windows.

      Hopefully this helps in the interim.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jponting James Ponting
              Reporter:
              btom1 Brian
              Votes:
              5 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated: