kubernetes 使用bitnami/keycloak部署/安装keycloak时更新Java堆大小

yb3bgrhw  于 12个月前  发布在  Kubernetes
关注(0)|答案(1)|浏览(156)

在Kubernetes pod中使用bitnami/keycloak部署/安装keycloak时,我一直收到OutOfMemoryError错误。

2023-02-09 17:33:49,316 ERROR [org.jboss.threads.errors] (build-19) Thread Thread[build-19,5,build group] threw an uncaught exception: java.util.concurrent.RejectedExecutionException
        at org.jboss.threads.RejectingExecutor.execute(RejectingExecutor.java:38)
        at org.jboss.threads.EnhancedQueueExecutor.rejectException(EnhancedQueueExecutor.java:2049)
        at org.jboss.threads.EnhancedQueueExecutor.doStartThread(EnhancedQueueExecutor.java:1713)
        at org.jboss.threads.EnhancedQueueExecutor.execute(EnhancedQueueExecutor.java:787)
        at io.quarkus.builder.BuildContext.depFinished(BuildContext.java:261)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:294)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
        at java.base/java.lang.Thread.run(Thread.java:829)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
        Suppressed: java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
                at java.base/java.lang.Thread.start0(Native Method)
                at java.base/java.lang.Thread.start(Thread.java:798)
                at org.jboss.threads.JBossThread.start(JBossThread.java:558)
                at org.jboss.threads.EnhancedQueueExecutor.doStartThread(EnhancedQueueExecutor.java:1709)
                ... 8 more

字符串
我怀疑这可能是因为Java堆的大小。如果我错了,请纠正我。
我已经检查了分配给机器的资源;一切看起来都很好。问题是如何更新value.yaml文件中的堆大小?https://github.com/bitnami/charts/blob/main/bitnami/keycloak/templates/configmap-env-vars.yaml中的JAVA_OPTS_APPEND是否是要覆盖的env变量?
如果有人有例子,请分享。

dohp0rv5

dohp0rv51#

在16.0.0上,我设置:

extraEnvVars:
  - name: JAVA_OPTS_APPEND
    value: "-Xms2048m -Xmx4096m -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:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=9"

字符串

相关问题