Skip to content

chore: add maxCpuCount:1 to avoids OOM kills (MSB4166) - #3166

Merged
Peter Ombwa (peombwa) merged 3 commits into
mainfrom
u/peombwa/fixBrokenBuild
Aug 5, 2026
Merged

chore: add maxCpuCount:1 to avoids OOM kills (MSB4166)#3166
Peter Ombwa (peombwa) merged 3 commits into
mainfrom
u/peombwa/fixBrokenBuild

Conversation

@peombwa

@peombwa Peter Ombwa (peombwa) commented Aug 5, 2026

Copy link
Copy Markdown
Member

This PR adds -maxCpuCount:1 to avoid MSB4166 from the huge generated project building in parallel on the runner.

-maxCpuCount:1 forces MSBuild to build projects sequentially in a single node, capping peak memory at the cost of some build time.

Microsoft Reviewers: Open in CodeFlow

@peombwa
Peter Ombwa (peombwa) marked this pull request as ready for review August 5, 2026 22:31
@peombwa
Peter Ombwa (peombwa) requested a review from a team as a code owner August 5, 2026 22:31
Copilot AI lite review requested due to automatic review settings August 5, 2026 22:31

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.

Pull request overview

This PR updates the pull request validation workflow to reduce MSBuild parallelism during the dotnet build step in order to lower peak memory usage and avoid OOM-related build failures (e.g., MSB4166) on GitHub-hosted runners.

Changes:

  • Update the CI build step to build sequentially by limiting MSBuild’s max CPU count.

Comment thread .github/workflows/validatePullRequest.yml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@peombwa
Peter Ombwa (peombwa) enabled auto-merge (squash) August 5, 2026 22:38
@peombwa
Peter Ombwa (peombwa) merged commit b4510d6 into main Aug 5, 2026
6 checks passed
@peombwa
Peter Ombwa (peombwa) deleted the u/peombwa/fixBrokenBuild branch August 5, 2026 23:55
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.

3 participants