set the worker heap cap with --worker-heap-mb
Signed-off-by: dawn <90008@klbr.net>
28 unmodified lines29303132333435363738172 unmodified linesExpand all21121221321421321521621521721821922022122222322422561 unmodified lines28 unmodified lines workers: { type: "string", default: String(Math.max(1, Math.floor(availableParallelism() / 2))) }, highlighters: { type: "string", default: "0" }, "worker-max-repos": { type: "string", default: "12" }, "worker-max-rss-mb": { type: "string", default: "650" }, // v8's old space per worker process "worker-heap-mb": { type: "string", default: "128" }, full: { type: "boolean", default: false }, ...BUDGET_OPTIONS }});172 unmodified linesExpand all // SVFE_PAGES_PROFILE=<dir> writes a cpu profile per worker there execArgv: process.versions.bun ? ["--bun", "--smol"] : [ "--max-old-space-size=128", `--max-old-space-size=${Number(opts["worker-heap-mb"]) || 128}`, "--max-semi-space-size=4", ...(process.env.SVFE_PAGES_PROFILE ? ["--cpu-prof", "--cpu-prof-dir", process.env.SVFE_PAGES_PROFILE] : []) ...(process.env.SVFE_PAGES_PROFILE ? ["--cpu-prof", "--cpu-prof-dir", process.env.SVFE_PAGES_PROFILE] : []), // SVFE_PAGES_HEAPSNAPSHOT=<dir> writes a heap snapshot there when a worker nears its heap cap ...(process.env.SVFE_PAGES_HEAPSNAPSHOT ? ["--heapsnapshot-near-heap-limit=1", `--diagnostic-dir=${process.env.SVFE_PAGES_HEAPSNAPSHOT}`] : []) ] }); children.add(child); await new Promise((resolve) => {61 unmodified lines