We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We can change the variable keycloak_quarkus_java_opts for java memory (the default value is -Xms1024m -Xmx2048m )
-Xms1024m -Xmx2048m
It's used in the templates/keycloak-sysconfig.j2 so the service is start with this option.
templates/keycloak-sysconfig.j2
Sadly, it's also existing a Xms & Xmx attribut harcoded in the kc.sh as your can see :
grep Xms /opt/keycloak/keycloak-24.0.1/bin/kc.sh JAVA_OPTS_KC_HEAP="$JAVA_OPTS_KC_HEAP -Xms64m -Xmx512m"
So, when start the keycloak service, it's using both argument .
Please found the full command used to start the service :
/etc/alternatives/jre_17/bin/java -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.err.encoding=UTF-8 -Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8 -XX:+ExitOnOutOfMemoryError -Djava.security.egd=file:/dev/urandom -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:FlightRecorderOptions=stackdepth=512 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -Xms64m -Xmx512m --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED -Xms1024m -Xmx2048m -Dkc.home.dir=/opt/keycloak/keycloak-24.0.1/bin/.. -Djboss.server.config.dir=/opt/keycloak/keycloak-24.0.1/bin/../conf -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dpicocli.disable.closures=true -Dquarkus-log-max-startup-records=10000 -cp /opt/keycloak/keycloak-24.0.1/bin/../lib/quarkus-run.jar io.quarkus.bootstrap.runner.QuarkusEntryPoint start --optimized --proxy-headers xforwarded
ansible [core 2.14.9]
middleware_automation.keycloak 2.1.0
ps -ef -wwww | grep keycloak
ps -ef -wwww | grep [k]eycloak keycloak 34089 1 0 Mar28 ? 00:42:14 /etc/alternatives/jre_17/bin/java -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.err.encoding=UTF-8 -Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8 -XX:+ExitOnOutOfMemoryError -Djava.security.egd=file:/dev/urandom -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:FlightRecorderOptions=stackdepth=512 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -Xms64m -Xmx512m --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED -Xms1024m -Xmx2048m -Dkc.home.dir=/opt/keycloak/keycloak-24.0.1/bin/.. -Djboss.server.config.dir=/opt/keycloak/keycloak-24.0.1/bin/../conf -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dpicocli.disable.closures=true -Dquarkus-log-max-startup-records=10000 -cp /opt/keycloak/keycloak-24.0.1/bin/../lib/quarkus-run.jar io.quarkus.bootstrap.runner.QuarkusEntryPoint start --optimized
a unique Xms & Xmx arguement on the started service
/etc/alternatives/jre_17/bin/java ... ... -Xms1024m -Xmx2048m ... ...
/etc/alternatives/jre_17/bin/java ... ... -Xms64m -Xmx512m ... ... -Xms1024m -Xmx2048m ... ...
The text was updated successfully, but these errors were encountered:
Reproed; heap settings go in envvar JAVA_OPTS_KC_HEAP not JAVA_OPTS_APPEND
JAVA_OPTS_KC_HEAP
JAVA_OPTS_APPEND
Sorry, something went wrong.
JAVA_OPTS
Successfully merging a pull request may close this issue.
SUMMARY
We can change the variable keycloak_quarkus_java_opts for java memory (the default value is
-Xms1024m -Xmx2048m
)It's used in the
templates/keycloak-sysconfig.j2
so the service is start with this option.Sadly, it's also existing a Xms & Xmx attribut harcoded in the kc.sh as your can see :
So, when start the keycloak service, it's using both argument .
Please found the full command used to start the service :
ISSUE TYPE
ANSIBLE VERSION
COLLECTION VERSION
STEPS TO REPRODUCE
ps -ef -wwww | grep keycloak
)ps -ef -wwww | grep [k]eycloak keycloak 34089 1 0 Mar28 ? 00:42:14 /etc/alternatives/jre_17/bin/java -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.err.encoding=UTF-8 -Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8 -XX:+ExitOnOutOfMemoryError -Djava.security.egd=file:/dev/urandom -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:FlightRecorderOptions=stackdepth=512 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -Xms64m -Xmx512m --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED -Xms1024m -Xmx2048m -Dkc.home.dir=/opt/keycloak/keycloak-24.0.1/bin/.. -Djboss.server.config.dir=/opt/keycloak/keycloak-24.0.1/bin/../conf -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dpicocli.disable.closures=true -Dquarkus-log-max-startup-records=10000 -cp /opt/keycloak/keycloak-24.0.1/bin/../lib/quarkus-run.jar io.quarkus.bootstrap.runner.QuarkusEntryPoint start --optimized
EXPECTED RESULTS
a unique Xms & Xmx arguement on the started service
/etc/alternatives/jre_17/bin/java ... ... -Xms1024m -Xmx2048m ... ...
ACTUAL RESULTS
/etc/alternatives/jre_17/bin/java ... ... -Xms64m -Xmx512m ... ... -Xms1024m -Xmx2048m ... ...
The text was updated successfully, but these errors were encountered: