Update Confluence Data Center setenv.sh to respect system environment variables if set

XMLWordPrintable

      Currently Confluence Data Center does not consider if the server the application is hosted on already has certain JVM options such as JVM_MINIMUM_MEMORY, JVM_MAXIMUM_MEMORY, and  JVM_SUPPORT_RECOMMENDED_ARGS already set.

      Instead it uses the static values defined in the setenv.sh/bat or windows service configuration.

      # Set the Java heap size
      CATALINA_OPTS="-Xms1024m -Xmx1024m ${CATALINA_OPTS}" 

       

      This same functionality is already implemented in Bitbucket Data Center in the _start-webapp.sh file as shown below:

       # The following 2 settings control the minimum and maximum memory allocated to the Java virtual machine.# For larger instances, the maximum amount will need to be increased.
      #
      if [ -z "${JVM_MINIMUM_MEMORY}" ]; then    JVM_MINIMUM_MEMORY=512m
      fi
      if [ -z "${JVM_MAXIMUM_MEMORY}" ]; then    JVM_MAXIMUM_MEMORY=1g
      fi 

      This request is to integrate the logic below into the setenv.sh file In Confluence Data Center by default:

      if [ -z "$JVM_MINIMUM_MEMORY" ]; then
        JVM_MINIMUM_MEMORY="4096m"
      fi
      if [ -z "$JVM_MAXIMUM_MEMORY" ]; then
        JVM_MAXIMUM_MEMORY="4096m"
      fi
      if [ -z "$JVM_SUPPORT_RECOMMENDED_ARGS" ]; then
        JVM_SUPPORT_RECOMMENDED_ARGS="-XX:+UseG1GC"

            Assignee:
            Unassigned
            Reporter:
            David McCoy
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: