Dell 自動化平台:Java 型容器從 Kernel 6.12 開始「OOMKilled」
Summary: 在 Linux 核心 6.12 或更新版本上執行時,Java 型容器化應用程式 (例如 Keycloak) 可能會因記憶體不足 (OOM) 錯誤而意外終止。此問題源於內核公開「cgroup」記憶體限制的方式的更改。 這些更改會影響 Java 虛擬機 (JVM) 正確檢測和遵守容器記憶體約束的能力。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Symptoms
針對 NativeEdge Dell 自動化平台, keycloak 正在得到 OOMKilled 在初始化期間。例如,在掌舵安裝期間,當 keycloak 豆莢即將出現。
記錄內部 keycloak 結尾為:
Appending additional Java properties to JAVA_OPTS Changes detected in configuration. Updating the server image. Updating the configuration and installing your custom providers, if any. Please wait.
容器的說明顯示:
State: Waiting Reason: CrashLoopBackOff Last State: Terminated Reason: OOMKilled
對於其他環境,可能是:
- 系統終止 Java 容器(例如,
keycloak,Kafka,Elasticsearch)與OOMKilled地位。 - JVM 報告異常高的堆大小估計值,通常與主機記憶體而不是容器限制匹配。
- 記憶體調整標誌,例如
-XX:MaxRAMPercentage顯得無效。 - 記錄可能會顯示以下訊息:
[debug][os,container] controller memory is not enabled[debug][os,container] One or more required controllers disabled at kernel level
Cause
從 Linux 內核 6.12 開始,內核不再公開
cgroup 控制器資訊由 /proc/cgroups,JVM 以前依賴它來檢測容器記憶體限制。此更改會破壞受影響 JVM 版本中的容器感知,導致它們假定它們可以訪問完整的主機記憶體。因此,JVM 分配的記憶體多於容器允許的記憶體,從而觸發內核的 OOMkiller。
這在開源專案中有幾個問題:
Ubuntu 24.04.3 預設不使用 6.12 核心。但某些映像已更新為 6.12、6.13、6.14 版本(例如,在 AWS 映像庫中)。
Resolution
有兩種可能的快速解決方法。
- 暫時增加容器的記憶體限制。例如,以下是繼續安裝 Dell 自動化平台的步驟,將
keycloak容器。
為此,必須運行以下命令(檢查業務流程協調程式命名空間,例如,如下所示
dapo 是預設業務流程協調程式命名空間:
kubectl edit sts keycloak -n dapo
找到記憶體限制和請求,並將其加倍。
keycloak 在準備步驟中消耗大量記憶體。此增加使我們能夠通過此初始化步驟。
- 顯式設定 JVM 記憶體限制
使用啟動標誌手動限制記憶體使用量:
extraEnvVars:
- name: JAVA_OPTS_KC_HEAP
value: "-XX:MaxRAMPercentage=70 -XX:MinRAMPercentage=70 -XX:InitialRAMPercentage=50 -XX:MaxRAM=1G"Affected Products
Dell Automation Platform, NativeEdge Solutions, Dell Automation Platform Components, NativeEdgeArticle Properties
Article Number: 000369678
Article Type: Solution
Last Modified: 16 Oct 2025
Version: 2
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.