From e6bce164c5371656c753af17759cd4751a5f1d43 Mon Sep 17 00:00:00 2001 From: "andrzej.janczak" Date: Thu, 3 Sep 2026 09:32:05 +0200 Subject: [PATCH] Cap the Node heap below the pod memory limit A prod run on a 410k-file repo died seconds after the agent started with no error output, most likely an OOM kill at the container limit. With NODE_OPTIONS=--max-old-space-size=1536 a Node process that outgrows the heap fails with a readable V8 error instead of a silent cgroup kill. Pairs with raising the autoconfig container limit to 2Gi in AAM. --- docker/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 5fbfeba..1cf8c06 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -23,6 +23,9 @@ RUN npm install -g \ @codacy/codacy-cloud-cli \ @codacy/analysis-cli +# Heap cap below the 2Gi pod limit: a Node process that outgrows it dies with a readable heap error, not a silent cgroup OOM kill +ENV NODE_OPTIONS=--max-old-space-size=1536 + # Pre-bake skills — Claude loads via --plugin-dir, Gemini installs from local path # ADD'ing the master ref content makes Docker invalidate this layer whenever codacy-skills master moves, # so a fresh `docker build` always gets the latest skills without --no-cache.