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

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

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Medium Medium
    • 8.0.0
    • 6.1.1, 6.3.2, 6.4.0, 6.10.0, 7.11.0
    • None

      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.

            [CONFSERVER-53524] Service.sh and setenv.bat files set different Java options

            James Ponting made changes -
            Fix Version/s New: 8.0.0 [ 101718 ]
            James Ponting made changes -
            Assignee New: James Ponting [ jponting ]
            James Ponting made changes -
            QA Demo Status Original: Not Done [ 14330 ] New: Done [ 14331 ]
            QA Kickoff Status Original: Not Done [ 14234 ] New: Done [ 14235 ]
            Testing Notes New: Resolved in Confluence 8 with the dropping of Java 8 support.
            Resolution New: Obsolete [ 11 ]
            Status Original: In Progress [ 3 ] New: Closed [ 6 ]
            SET Analytics Bot made changes -
            UIS Original: 1 New: 2
            SET Analytics Bot made changes -
            UIS Original: 2 New: 1
            SET Analytics Bot made changes -
            UIS Original: 1 New: 2
            SET Analytics Bot made changes -
            Support reference count Original: 59 New: 60
            Steve Shaw made changes -
            Remote Link Original: This issue links to "Page (Confluence)" [ 459262 ]
            James Ponting made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 630646 ]
            James Ponting made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 628933 ]

              jponting James Ponting
              btom1 Brian
              Affected customers:
              5 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: