From 7de6e94a8db7746b85f48b699a70d590998721a5 Mon Sep 17 00:00:00 2001 From: Sienna Meridian Satterwhite Date: Mon, 2 Mar 2026 18:33:42 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20resource=20tuning=20=E2=80=94=20LiveKit?= =?UTF-8?q?=20Recreate=20strategy,=20OpenSearch=20JVM=20heap,=20login-ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LiveKit: switch to Recreate deployment strategy. hostPorts (TURN UDP relay range) block RollingUpdate because the new pod cannot schedule while the old one still holds the ports. OpenSearch: set OPENSEARCH_JAVA_OPTS to -Xms192m -Xmx256m. The upstream default (-Xms512m -Xmx1g) immediately OOMs the container given our 512Mi memory limit. login-ui: raise memory limit from 64Mi to 192Mi and add a 64Mi request; the previous limit was too tight and caused OOMKilled restarts under load. --- base/media/livekit-values.yaml | 5 +++++ overlays/local/values-resources.yaml | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/base/media/livekit-values.yaml b/base/media/livekit-values.yaml index 1ed6fc9..5180184 100644 --- a/base/media/livekit-values.yaml +++ b/base/media/livekit-values.yaml @@ -36,3 +36,8 @@ deployment: requests: memory: 64Mi cpu: 100m + +# Recreate strategy: hostPorts (TURN UDP relay range) block RollingUpdate — +# the new pod cannot schedule while the old one still holds the host ports. +deploymentStrategy: + type: Recreate diff --git a/overlays/local/values-resources.yaml b/overlays/local/values-resources.yaml index 0a8ef71..05ab888 100644 --- a/overlays/local/values-resources.yaml +++ b/overlays/local/values-resources.yaml @@ -74,9 +74,16 @@ spec: spec: containers: - name: opensearch + env: + # Reduce JVM heap so it fits within the 512Mi container limit. + # Base sets -Xms512m -Xmx1g which immediately OOMs the container. + - name: OPENSEARCH_JAVA_OPTS + value: "-Xms192m -Xmx256m" resources: limits: memory: 512Mi + requests: + memory: 256Mi --- apiVersion: apps/v1 @@ -121,6 +128,8 @@ spec: - name: login-ui resources: limits: + memory: 192Mi + requests: memory: 64Mi ---