From d4bb4e17f2c7d58563d8dee1a6cf280e030c1bfc Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Wed, 12 Aug 2026 18:28:05 -0400 Subject: [PATCH] =?UTF-8?q?docs(plans):=20AddTemplateScript=20OOM=20re-tes?= =?UTF-8?q?ted=20on=20wonder=20=E2=80=94=20no=20longer=20reproduces=20(bot?= =?UTF-8?q?h=20forms,=20throwaway=20template,=20<1s)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/plans/2026-08-12-script-compile-metadata-resolver-cache.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plans/2026-08-12-script-compile-metadata-resolver-cache.md b/docs/plans/2026-08-12-script-compile-metadata-resolver-cache.md index d9ba32ac..a1f9032e 100644 --- a/docs/plans/2026-08-12-script-compile-metadata-resolver-cache.md +++ b/docs/plans/2026-08-12-script-compile-metadata-resolver-cache.md @@ -590,7 +590,7 @@ Measured as a fixed-compile-count A/B (both nodes compile an identical startup s | Site / Central working set | 2,814 / 1,374 MB | 612 / 663 MB (post-fix read at ~5 min uptime — not uptime-matched; the metadata counts are the controlled result) | | Site / Central working set — **uptime-matched re-read** (26.3 min, same `20f2ae05` boot) | 2,814 / 1,374 MB (24+ min) | **620 / 695 MB** — flat vs the 5-min read (+8 / +32 MB), so the comparison is now clean: **4.5× / 2.0× working-set reduction** | -`CachingScriptMetadataResolver` shows exactly 1 instance per process in the gcdump — active in production. Calibration note: the steady-state residual is a **fixed** cost of roughly one shared closure set + statics (~800 for 21 scripts ≈ 38/script amortized), not the per-compile ≤~10 growth figure — the growth figure applies to *additional* compiles (rig-verified at +2/compile), the fixed cost to the startup set. Follow-up lead (not closed by this): re-test the complex `AddTemplateScript` OOM on wonder — that path was shown twice not to compile scripts, but the OOM signature (large allocation failing with GBs free) matches the native-heap state this leak produced, and the test is now cheap. +`CachingScriptMetadataResolver` shows exactly 1 instance per process in the gcdump — active in production. Calibration note: the steady-state residual is a **fixed** cost of roughly one shared closure set + statics (~800 for 21 scripts ≈ 38/script amortized), not the per-compile ≤~10 growth figure — the growth figure applies to *additional* compiles (rig-verified at +2/compile), the fixed cost to the startup set. Follow-up lead — **re-tested 2026-08-12, no longer reproduces**: the complex `AddTemplateScript` OOM (historically a deterministic 3–8 min hang → `OutOfMemoryException` on a ~20-line handshake body, all three authored forms, reproducible on a throwaway template) was re-run on `20f2ae05` against a fresh throwaway template (id 27, created and deleted for the test) with a faithful re-authoring of the `WriteBatchAndWaitAsync` form AND the `Attributes.WaitAsync` form, driven from a clean off-box client: both returned **HTTP 200 in <1 s**, rows persisted, Central healthy. Recorded as *no longer reproduces* rather than attributed to this fix — four deploys (`3c9b101d`→`20f2ae05`) intervened since the last confirmed repro and are not distinguishable after the fact. ## Out of scope / follow-ups