diff --git a/CLAUDE.md b/CLAUDE.md index 2cfba83..06b3ce7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -52,7 +52,7 @@ Deploying a change is: build and push the image, then pull it and recreate the c **Build only with `scripts/build-image.sh`, never a bare `docker buildx build`.** On 2026-11-04 a plain build of ipx, its dependency layer invalidated by a `Cargo.toml` change, rebuilt everything in release on all twelve threads with 5 GB free; Tower thrashed for three hours with -every core pegged and had to be rebooted. The script refuses to start under 9 GB available or +every core pegged and had to be rebooted. The script refuses to start under 6 GB available or above load 12, and builds in the BuildKit container `ipx-capped` (made on first use), held to 6 GB of memory and six threads by its cgroup: a build that outgrows that is killed, and production keeps running. If one is killed, say so and wait for the user to decide; do not raise the caps or go diff --git a/scripts/build-image.sh b/scripts/build-image.sh index 03f10a7..2c2a7c9 100644 --- a/scripts/build-image.sh +++ b/scripts/build-image.sh @@ -12,7 +12,7 @@ set -eu MEM=6g # the builder's memory cap (Tower has no swap to spill into) CPUS=0-5 # six of twelve threads; cargo inside sees six and runs six jobs -NEED_KB=$((9 * 1024 * 1024)) # the cap plus 3 GB for everything else +NEED_KB=$((6 * 1024 * 1024)) # the cap; the cgroup kills a build that outgrows it MAX_LOAD=12 BUILDER=ipx-capped