What happened. 2026-11-14 06:45:44Z to 06:48:09Z the forge (0.7.595) was down: Bun 1.3.14 died with panic: Segmentation fault at address 0x0, RSS: 4.18GB | Peak: 15.99GB, and docker restarted it. Nothing else was wrong; the process normally holds about 1.8 GiB.
Cause, proven on the stage rig.GET /api/v1/admin/profile (src/perf/sample.ts) calls startSamplingProfiler() and never stops it; its own note says "the profiler stays attached until this process restarts". After the window nobody reads the traces, so they pile up. On a copy of production with the same page loads for three minutes:
start
+60 s
+120 s
+180 s
after one 5-second profile
905 MiB
1,549
2,073
2,436
no profile (control)
1,259 MiB
1,125
1,109
1,119
About 500 MiB a minute under load. On production the first profile of that process was at 06:07Z and it died 38 minutes later at a 16 GiB peak: the same rate.
Ask.
A profile never outlives its window. If this Bun can stop the sampler, stop it. If it cannot, the profile runs somewhere that can be thrown away (a short-lived Worker cannot sample the serving thread, so: prove what works) or the traces are drained and discarded on a named timer for as long as the sampler is attached, with a test on Linux that memory is flat ten minutes after a profile under load.
Until that is proven the endpoint refuses on a forge that serves people, with one sentence saying why and that the stage rig still allows it (FORGE_PROFILE=1). This is a guard for uptime, not for caution: it took the forge down.
The forge's own memory is watched: a serving process that grows past a multiple of its usual size raises a needs-you line with its size and the time it started growing, before it dies.
Done when. The table above, re-run with the fix, is flat in both rows.
What happened. 2026-11-14 06:45:44Z to 06:48:09Z the forge (0.7.595) was down: Bun 1.3.14 died with
panic: Segmentation fault at address 0x0,RSS: 4.18GB | Peak: 15.99GB, and docker restarted it. Nothing else was wrong; the process normally holds about 1.8 GiB.Cause, proven on the stage rig.
GET /api/v1/admin/profile(src/perf/sample.ts) callsstartSamplingProfiler()and never stops it; its own note says "the profiler stays attached until this process restarts". After the window nobody reads the traces, so they pile up. On a copy of production with the same page loads for three minutes:About 500 MiB a minute under load. On production the first profile of that process was at 06:07Z and it died 38 minutes later at a 16 GiB peak: the same rate.
Ask.
FORGE_PROFILE=1). This is a guard for uptime, not for caution: it took the forge down.Done when. The table above, re-run with the fix, is flat in both rows.