Skip to content

Commit 533aed1

Browse files
authored
build(mac): drop webpack heap from 6 GB to 4 GB on the macOS build (#9968)
The 6 GB ceiling set by #9967 was too aggressive for the macOS x64 VM's total RAM. Build #1295 on `pgabf-macos-x64` failed in `_build_runtime` at `unzip electron-vX.X.X-darwin-x64.zip` with exit code 2 — never even reached webpack. That points at OS-level memory pressure spilling out of the Node process and starving the rest of the build: at 6 GB reserved, the box runs out of RAM long before Terser actually needs the full ceiling. Drop back to 4 GB, which still gives Terser a full extra gigabyte beyond the original 3 GB setting that OOM-killed webpack in #1294, but leaves enough headroom for the other steps in the appbundle build to coexist. Only the macOS appbundle path changes (see pkg/mac/build-functions.sh); linux/pip/Makefile and dev-machine builds keep the 3 GB the `bundle` npm script ships with.
1 parent 3e1921d commit 533aed1

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

pkg/mac/build-functions.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,15 @@ _complete_bundle() {
307307
# Jenkins console instead of an empty gap before the trap fires.
308308
# NODE_ENV mirrors the top-level "bundle" npm script (see
309309
# web/package.json). NODE_OPTIONS bumps V8's old-space ceiling
310-
# past the 3 GB default the npm script uses: the macOS x64 builder
311-
# OS-OOM-kills webpack inside TerserPlugin at the 3 GB setting
312-
# (build #1294, sealing asset processing at 92%). Other build
310+
# past the 3 GB default the npm script uses: at 3 GB the macOS
311+
# x64 builder OS-OOM-killed webpack inside TerserPlugin (build
312+
# #1294, sealing asset processing at 92%). 6 GB was too much for
313+
# the x64 VM's total RAM and pushed earlier steps into low-memory
314+
# failures (build #1295), so we land at 4 GB — enough headroom
315+
# for Terser without starving the rest of the build. Other build
313316
# paths still get 3 GB via the npm script.
314317
export NODE_ENV=production
315-
export NODE_OPTIONS=--max-old-space-size=6144
318+
export NODE_OPTIONS=--max-old-space-size=4096
316319
echo "==> Running ESLint..."
317320
yarn run linter 2>&1
318321
echo "==> Running webpack bundle..."

0 commit comments

Comments
 (0)