From bb87e1a31579e9ae8674f6a468ea954b5d211157 Mon Sep 17 00:00:00 2001 From: Lee Chapman Date: Sun, 8 Feb 2026 21:05:10 -0800 Subject: [PATCH] fix: API OOM 137 - liveness probe, memory, probe timeouts - Use /api/livez for liveness (lightweight, no DB) to avoid SIGKILL on slow health - Increase memory limit 1Gi -> 2Gi to reduce OOM risk - Increase probe timeouts: liveness 5s->10s, readiness 3s->10s - Increase readiness failureThreshold 2->3 - Bump API image to v0.17 Co-authored-by: Cursor --- k8s/api-deployment-blue.yaml | 14 +++++++------- k8s/api-deployment-green.yaml | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/k8s/api-deployment-blue.yaml b/k8s/api-deployment-blue.yaml index b873cc1..8fdaa5b 100644 --- a/k8s/api-deployment-blue.yaml +++ b/k8s/api-deployment-blue.yaml @@ -20,7 +20,7 @@ spec: spec: containers: - name: api - image: harbor.dataknife.net/library/high-command-api:v0.11 + image: harbor.dataknife.net/library/high-command-api:v0.17 imagePullPolicy: Always env: - name: MODE @@ -56,27 +56,27 @@ spec: protocol: TCP livenessProbe: httpGet: - path: /api/health + path: /api/livez port: http initialDelaySeconds: 30 periodSeconds: 30 - timeoutSeconds: 5 + timeoutSeconds: 10 failureThreshold: 3 readinessProbe: httpGet: path: /api/health port: http - initialDelaySeconds: 10 + initialDelaySeconds: 15 periodSeconds: 10 - timeoutSeconds: 3 - failureThreshold: 2 + timeoutSeconds: 10 + failureThreshold: 3 resources: requests: cpu: "200m" memory: "256Mi" limits: cpu: "1000m" - memory: "1Gi" + memory: "2Gi" securityContext: runAsNonRoot: true runAsUser: 1000 diff --git a/k8s/api-deployment-green.yaml b/k8s/api-deployment-green.yaml index a80ba1c..f65aa3c 100644 --- a/k8s/api-deployment-green.yaml +++ b/k8s/api-deployment-green.yaml @@ -20,7 +20,7 @@ spec: spec: containers: - name: api - image: harbor.dataknife.net/library/high-command-api:v0.11 + image: harbor.dataknife.net/library/high-command-api:v0.17 imagePullPolicy: Always env: - name: MODE @@ -56,27 +56,27 @@ spec: protocol: TCP livenessProbe: httpGet: - path: /api/health + path: /api/livez port: http initialDelaySeconds: 30 periodSeconds: 30 - timeoutSeconds: 5 + timeoutSeconds: 10 failureThreshold: 3 readinessProbe: httpGet: path: /api/health port: http - initialDelaySeconds: 10 + initialDelaySeconds: 15 periodSeconds: 10 - timeoutSeconds: 3 - failureThreshold: 2 + timeoutSeconds: 10 + failureThreshold: 3 resources: requests: cpu: "200m" memory: "256Mi" limits: cpu: "1000m" - memory: "1Gi" + memory: "2Gi" securityContext: runAsNonRoot: true runAsUser: 1000