Skip to content

[docs-infra] Cap Netlify Next.js build parallelism to avoid OOM#22847

Merged
Janpot merged 4 commits into
mui:masterfrom
Janpot:fix/netlify-docs-build-oom-cpus
Jun 17, 2026
Merged

[docs-infra] Cap Netlify Next.js build parallelism to avoid OOM#22847
Janpot merged 4 commits into
mui:masterfrom
Janpot:fix/netlify-docs-build-oom-cpus

Conversation

@Janpot

@Janpot Janpot commented Jun 17, 2026

Copy link
Copy Markdown
Member

The Netlify docs build (pnpm docs:build) runs out of memory during the Next.js static export. The shared withDocsInfra wrapper defaults experimental.cpus to os.availableParallelism() (all cores) on CI, overridable via the NEXT_PARALLELISM env var.

Set NEXT_PARALLELISM = "4" in netlify.toml to cap the build worker count and lower peak memory — the same lever material-ui uses, rather than hardcoding experimental.cpus in docs/next.config.ts.

@code-infra-dashboard

code-infra-dashboard Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-22847--material-ui-x.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@Janpot
Janpot force-pushed the fix/netlify-docs-build-oom-cpus branch from 15d2a2b to 49dfcba Compare June 17, 2026 07:19
@Janpot Janpot changed the title [docs] Reduce Next.js build worker count on Netlify to avoid OOM [docs] Cap Netlify Next.js build parallelism to avoid OOM Jun 17, 2026
@Janpot
Janpot force-pushed the fix/netlify-docs-build-oom-cpus branch from 49dfcba to 734a27b Compare June 17, 2026 07:28
@Janpot Janpot added type: regression A bug, but worse, it used to behave as expected. scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). labels Jun 17, 2026
@Janpot Janpot changed the title [docs] Cap Netlify Next.js build parallelism to avoid OOM [docs-infra] Cap Netlify Next.js build parallelism to avoid OOM Jun 17, 2026
@Janpot
Janpot marked this pull request as ready for review June 17, 2026 09:14
@Janpot
Janpot merged commit 12b2b7c into mui:master Jun 17, 2026
20 of 26 checks passed
mbrookes pushed a commit to mbrookes/mui-x that referenced this pull request Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). type: regression A bug, but worse, it used to behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants