Repository navigation
Conversation
The build starts many processes at once. On runners with fewer resources, such as those used by private forks, the kernel can refuse to start more of them, failing the build with `spawn ENOMEM`. A 4 GB swap file raises the amount of memory that can be committed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Y86gzn3apHfS8kjjkmzTW
…mits. Runs `npm run build -- --skip-types` inside a cgroup capped at the limits of the standard runners for private repositories (2 vCPU, 8 GB RAM), with no swap, the image's swap, and an extra 4 GB swap file, and reports the peak memory, swap and process count of each. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Y86gzn3apHfS8kjjkmzTW
🤖 PR meta 🤖🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This is an experiment PR on a fork. It isn't meant to be merged as is.
What?
Adds a 4 GB swap file before
npm run build -- --skip-typesin the E2E Playwright jobs onwp/7.0. It also adds a workflow that measures how much memory, swap and how many processes that build uses under the limits of the standard runners for private repositories (2 vCPU, 8 GB RAM).Why?
On runners with fewer resources, such as those used by private forks, an E2E shard occasionally fails in "Npm build" with
[plugin sass-plugin] spawn ENOMEM.wp-buildon this branch starts every package's build at once, and each one with Sass starts its ownsass-embeddedcompiler process. When committed memory runs out, the kernel refuses to start another process.Trunk fixed this inside
wp-build(WordPress#79889). This tries a fix that doesn't change the published@wordpress/buildpackage: more swap raises the amount of memory the kernel lets processes commit.The hosted Ubuntu image already has 3 GB of swap (
/mnt/swapfile), so this adds a second 4 GB file on the/mntdisk.How?
end2end-test.yml: an "Add swap space" step (fallocate,mkswap,swaponon/mnt/swapfile-build) right before "Npm build".build-memory-experiment.yml: each leg runs the same build inside a systemd scope limited toMemoryMax=7G(8 GB minus about 1 GB for the OS and runner agent),CPUQuota=200%,taskset -c 0,1andGOMAXPROCS=2. The legs differ only in swap:Each leg reports to the job summary:
The "Runner resources" step also logs
vm.overcommit_*,CommitLimitandCommitted_AS.Testing
swapon --showshould list both files.A cgroup memory limit doesn't reproduce the kernel's system-wide commit check that produces
spawn ENOMEM. The experiment shows how close the build gets to the limits, not the exact failure.🤖 Generated with Claude Code
https://claude.ai/code/session_011Y86gzn3apHfS8kjjkmzTW