diff --git a/jetty/start.sh b/jetty/start.sh index 87e73fbb2..988367e81 100755 --- a/jetty/start.sh +++ b/jetty/start.sh @@ -27,10 +27,13 @@ case "${CONTAINER_NAME}" in "frontend"|"console") PROFILER_ARGS="-agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=${CONTAINER_NAME},-cprof_enable_heap_sampling=true" esac -java $PROFILER_ARGS \ - # Allocate bigger than default fraction of available memory to the application, as it's running in a (single-purposed) container. - -XX:InitialRAMPercentage=50.0 \ - -XX:MaxRAMPercentage=50.0 \ - -Dgoogle.registry.environment=${env} \ - -Djava.util.logging.config.file=/logging.properties \ +JVM_OPTS=( + # Allocate bigger than default fraction of available memory to the + # application, as it's running in a (single-purposed) container. + -XX:InitialRAMPercentage=50.0 + -XX:MaxRAMPercentage=50.0 + -Dgoogle.registry.environment="${env}" + -Djava.util.logging.config.file=/logging.properties -jar /usr/local/jetty/start.jar +) +java $PROFILER_ARGS "${JVM_OPTS[@]}"