#
# Jetty server configuration
#

# Memory settings
#
# The defaults should be enough for up to ~100 nodes, you need to give Jetty more memory
# in "JAVA_XMX" for larger setups.
#
# See https://docs.rudder.io/reference/current/administration/performance.html#_configure_ram_allocated_to_jetty
# for details.
#
# Values are in megabytes (MB).
#
JAVA_XMX=1024
JAVA_MAXPERMSIZE=256

# Java VM arguments
#
# Please specify additional options to pass
# to the Java VM during Jetty setup if needed.
#
# Example: -Duser.timezone=Europe/Paris
# (To be given in case the JRE you use is unable to detect
# the machine timezone and defaults to a wrong one)
#
#JAVA_OPTIONS=""

# Java garbage collector option
#
# By default, Rudder uses G1GC which is a very good general purpose GC on
# all sizes of heap. The configuration should be good on most case.
# But you can change GC or tune GC options here, like debug flags.
# Documentation can be found here:
# https://docs.oracle.com/en/java/javase/11/gctuning/garbage-first-garbage-collector-tuning.html
#
# For example, to keep default GC and options but add a hint on maximum
# latency for full GC, you can use:
#JAVA_GC="-XX:+UseG1GC
#-XX:+UseStringDeduplication
#-XX:+AlwaysPreTouch
#-XX:MaxGCPauseMillis=100"

# Java garbage collector log options
# You can specify alternatives options for JVM GC logs: file path, log level, rotation parameters.

# Configure alternative log file path. Default is:
#JAVA_GC_LOG_FILE="/var/log/rudder/webapp/jvm/jvm-gc.log"
# For example for a specific file for debug logs:
#JAVA_GC_LOG_FILE="/var/log/rudder/webapp/jvm/jvm-gc-debug.log"

# Configure log level for debug. Default gives general info about GC timing:
#JAVA_GC_LOG="gc=info,gc+cpu=info,gc+stringdedup=info"
# The example below is insightful for debugging GC problem but verbose:
#JAVA_GC_LOG="gc*=info,gc+heap=debug,gc+phases=debug,gc+ref*=debug,gc+ergo*=trace,gc+age*=trace"

# Configure gc log rotation. Default is 5 files of 50M:
#JAVA_GC_LOG_ROTATE="filecount=5,filesize=50M"
# But it may be too little for debug, you may want less, bigger files:
#JAVA_GC_LOG_ROTATE="filecount=3,filesize=100M"

# Java VM location
#
# This script should be able to automatically detect the majority of
# common OSes Java setups
#
# Please specify a JVM location here if the script is unable to find
# it.
#
#JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
#JAVA=java

# Source variables from /opt/rudder/etc/rudder-jetty.conf
# Warning: removing this is likely to prevent Jetty from
# starting correctly
[ -f /opt/rudder/etc/rudder-jetty.conf ] && . /opt/rudder/etc/rudder-jetty.conf
