From 56726503c93db6149c19282c62fa8afc11e41d0a Mon Sep 17 00:00:00 2001 From: Zvi Grinberg Date: Thu, 9 Jul 2026 17:19:09 +0300 Subject: [PATCH] fix: switch liveness probe from httpGet to exec to prevent pod crashes under heavy CPU load The Python event loop (GIL-bound) cannot serve HTTP /health responses when the CPU is saturated by concurrent workloads, causing the httpGet liveness probe to fail repeatedly and triggering pod restarts. The exec probe checks that PID 1 is still alive via /proc/1/status, which runs outside the Python process and is unaffected by event loop stalls. --- kustomize/base/exploit_iq_service.yaml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/kustomize/base/exploit_iq_service.yaml b/kustomize/base/exploit_iq_service.yaml index 3b5759c94..df47b101a 100644 --- a/kustomize/base/exploit_iq_service.yaml +++ b/kustomize/base/exploit_iq_service.yaml @@ -66,18 +66,14 @@ spec: protocol: TCP containerPort: 8080 livenessProbe: - failureThreshold: 24 - timeoutSeconds: 10 - periodSeconds: 20 - httpGet: - path: /health - port: http -# If still doing problems under heavy cpu loads and heavy concurrent workloads , kindly uncomment the tcpSocket block below, -# and comment out the httpGet group as a temporary workaround. -# Upgrading the agent to python version 3.14 will solve this issue as it will -# be a real parallel multi-threading environment without GIL ( Global Interpreter Lock) restrictions. -# tcpSocket: -# port: 8080 + failureThreshold: 3 + timeoutSeconds: 5 + periodSeconds: 30 + exec: + command: + - /bin/sh + - -c + - cat /proc/1/status | grep -q '^State:.*[RSDs]' resources: limits: