Skip to content

Raise production webpack heap limit to 8 GiB - #23224

Merged
niik merged 1 commit into
developmentfrom
niik-fix-production-build-oom
Nov 26, 2026
Merged

niik merged 1 commit into
developmentfrom
niik-fix-production-build-oom

Conversation

@niik

@niik niik commented Nov 24, 2026

Copy link
Copy Markdown
Member

No tracking issue; relates to the CI failures in #23223 and the local workaround described in #23217.

Description

  • npm run compile:prod capped the V8 heap at 4096 MB. The production build (five webpack configs in one process, each type-checking with ts-loader and emitting source maps) now peaks just above that, so it fails with FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory.
  • This PR raises the limit to 8192 MB. The limit is a ceiling, not a reservation, and GitHub-hosted runners have at least 7 GB of RAM (16 GB on standard Windows/Linux and macOS arm64).
  • Alternative considered: ts-loader transpileOnly would cut memory substantially. It would also remove the only type-check of app/src in CI, so it is left out of this minimal fix.

Validation (macOS arm64, Node 24.19.0, commit 3d25f25):

  • /usr/bin/time -l npm run compile:prod before the change (4096): failed, heap out of memory, max RSS ≈ 4.51 GB.
  • /usr/bin/time -l npm run compile:prod after the change (8192): passed, all 5 configs compiled, max RSS ≈ 4.40–4.65 GB across two runs.
  • npx prettier --check package.json: passed.

Screenshots

N/A, build tooling only.

Release notes

Notes: no-notes

Team-authored review

Evidence: See the validation results in the Description. No visual artifact: this is a one-line build-script change with no UI or runtime effect.

Review path: Lightweight review. The change only affects the build-time Node heap limit and does not touch security, data-loss, release-signing, or update paths. Draft until the author confirms their assessment.

The production compile now peaks just above the 4 GiB V8 heap limit,
causing intermittent out-of-memory failures in CI (#23223) and locally
(#23217).

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 14:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the production build heap-limit increase.

No open issues 🎉

What changed in this PR

Increases memory headroom for GitHub Desktop’s production webpack build to address the heap exhaustion reported in #23223 and #23217.

Changes:

  • Raises the compile:prod V8 heap ceiling from 4 GiB to 8 GiB.
  • Retains existing type-checking and source-map generation, with no application runtime changes.
File Description
package.json Increases compile:prod’s --max_old_space_size from 4096 to 8192.

Review effort: Balanced

@niik
niik merged commit 35f5950 into development Nov 26, 2026
25 checks passed
@niik
niik deleted the niik-fix-production-build-oom branch November 26, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants