From 111fa45417e9c603fc0b7421e48b4d47a2cb627b Mon Sep 17 00:00:00 2001 From: Search Date: Sat, 4 Jul 2026 19:45:36 +0000 Subject: [PATCH 1/3] fix(helm): reduce hindsight DB pressure during liveness --- helm/hindsight/values.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/helm/hindsight/values.yaml b/helm/hindsight/values.yaml index 6d799dc0cd..81cdd98b87 100644 --- a/helm/hindsight/values.yaml +++ b/helm/hindsight/values.yaml @@ -39,7 +39,7 @@ api: # Liveness and readiness probes livenessProbe: httpGet: - path: /health + path: /version port: 8888 initialDelaySeconds: 30 periodSeconds: 10 @@ -101,6 +101,12 @@ api: env: #HINDSIGHT_API_LLM_PROVIDER: "groq" HINDSIGHT_API_LLM_MODEL: "openai/gpt-oss-120b" + # Keep embedded PostgreSQL deployments from opening hundreds of idle + # asyncpg connections across API and worker pods under backlog pressure. + HINDSIGHT_API_DB_POOL_MIN_SIZE: "1" + HINDSIGHT_API_DB_POOL_MAX_SIZE: "10" + HINDSIGHT_API_READ_DB_POOL_MIN_SIZE: "1" + HINDSIGHT_API_READ_DB_POOL_MAX_SIZE: "10" # Secret environment variables secrets: @@ -134,7 +140,7 @@ worker: # Liveness and readiness probes livenessProbe: httpGet: - path: /health + path: /metrics port: 8889 initialDelaySeconds: 30 periodSeconds: 10 @@ -155,7 +161,11 @@ worker: # Poll interval in milliseconds (how often to check for new tasks) HINDSIGHT_API_WORKER_POLL_INTERVAL_MS: "500" # Number of tasks to claim per poll cycle - HINDSIGHT_API_WORKER_BATCH_SIZE: "10" + HINDSIGHT_API_WORKER_BATCH_SIZE: "1" + # Bound per-worker task and DB write concurrency for the default embedded DB. + HINDSIGHT_API_WORKER_MAX_SLOTS: "1" + HINDSIGHT_API_WORKER_CONSOLIDATION_MAX_SLOTS: "1" + HINDSIGHT_API_RETAIN_MAX_CONCURRENT: "1" # Max retries before marking a task as failed HINDSIGHT_API_WORKER_MAX_RETRIES: "3" # HTTP port for metrics/health (matches service.targetPort) From ac2b8193f733ae17ad174f4a0555c9992fe22ad1 Mon Sep 17 00:00:00 2001 From: Search Date: Sat, 4 Jul 2026 20:02:04 +0000 Subject: [PATCH 2/3] fix(helm): preserve shared worker capacity --- helm/hindsight/values.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helm/hindsight/values.yaml b/helm/hindsight/values.yaml index 81cdd98b87..2ad8ec1f01 100644 --- a/helm/hindsight/values.yaml +++ b/helm/hindsight/values.yaml @@ -163,7 +163,8 @@ worker: # Number of tasks to claim per poll cycle HINDSIGHT_API_WORKER_BATCH_SIZE: "1" # Bound per-worker task and DB write concurrency for the default embedded DB. - HINDSIGHT_API_WORKER_MAX_SLOTS: "1" + # Keep one shared slot available for reservation-less task types like retain. + HINDSIGHT_API_WORKER_MAX_SLOTS: "2" HINDSIGHT_API_WORKER_CONSOLIDATION_MAX_SLOTS: "1" HINDSIGHT_API_RETAIN_MAX_CONCURRENT: "1" # Max retries before marking a task as failed From 59d01a725e3aced22bb64210f907a348d45ef3f3 Mon Sep 17 00:00:00 2001 From: Search Date: Wed, 8 Jul 2026 06:41:26 +0000 Subject: [PATCH 3/3] fix(helm): align Hindsight probe and worker slot defaults --- helm/hindsight/values.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/helm/hindsight/values.yaml b/helm/hindsight/values.yaml index 2ad8ec1f01..e8146c2171 100644 --- a/helm/hindsight/values.yaml +++ b/helm/hindsight/values.yaml @@ -48,7 +48,7 @@ api: readinessProbe: httpGet: - path: /health + path: /version port: 8888 initialDelaySeconds: 10 periodSeconds: 5 @@ -149,7 +149,7 @@ worker: readinessProbe: httpGet: - path: /health + path: /metrics port: 8889 initialDelaySeconds: 10 periodSeconds: 5 @@ -166,6 +166,7 @@ worker: # Keep one shared slot available for reservation-less task types like retain. HINDSIGHT_API_WORKER_MAX_SLOTS: "2" HINDSIGHT_API_WORKER_CONSOLIDATION_MAX_SLOTS: "1" + HINDSIGHT_API_WORKER_RETAIN_MAX_SLOTS: "1" HINDSIGHT_API_RETAIN_MAX_CONCURRENT: "1" # Max retries before marking a task as failed HINDSIGHT_API_WORKER_MAX_RETRIES: "3"