Skip to content

Limit Renovate Node heap for pnpm runs#27350

Merged
ErisDS merged 1 commit intomainfrom
fix/renovate-node-max-memory
Apr 12, 2026
Merged

Limit Renovate Node heap for pnpm runs#27350
ErisDS merged 1 commit intomainfrom
fix/renovate-node-max-memory

Conversation

@ErisDS
Copy link
Copy Markdown
Member

@ErisDS ErisDS commented Apr 12, 2026

Summary

  • add toolSettings.nodeMaxMemory: 1024 to Ghost's Renovate config
  • apply the first maintainer-recommended mitigation for Mend-hosted pnpm lockfile OOMs
  • give pnpm a smaller Node heap so the overall Renovate process has more headroom within Mend's 3GB runner limit

Why this change

Recent Mend Renovate runs on Ghost have been failing with kernel-out-of-memory shortly after the pnpm migration, using the full 3GB memory limit while regenerating pnpm-lock.yaml.

In the failing runs, Renovate gets as far as:

  • Generating pnpm-lock.yaml for .
  • Spawning pnpm install to create pnpm-lock.yaml

and then the job dies at 3.0GB (of 3.0GB limit) before it can return to branch updates or automerge logic.

Renovate maintainers suggested starting with:

{
  "toolSettings": {
    "nodeMaxMemory": 1024
  }
}

as the first mitigation for pnpm OOMs on Mend-hosted infrastructure. The goal is to keep pnpm's own Node heap smaller so the overall Renovate process stays under the hosted runner memory ceiling.

Context

Notes

This does not solve every reason a given run may do no work — schedule and automerge eligibility still matter — but it should reduce the number of runs that fail before they even reach merge logic.

Recent Mend Renovate runs have been failing with kernel-out-of-memory
shortly after the pnpm migration, using the full 3GB memory limit while
processing lockfile updates. Renovate maintainers recommended starting
with toolSettings.nodeMaxMemory set to 1024MB so pnpm keeps its own Node
heap smaller and leaves headroom for the rest of the Renovate process on
hosted runners.

This is the first recommended mitigation from renovatebot/renovate
#41972 / #40942 before asking Mend for more memory.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fe5d3023-5005-43f8-8e7f-2a6a0366bb7c

📥 Commits

Reviewing files that changed from the base of the PR and between fe4ef54 and 6cce768.

📒 Files selected for processing (1)
  • .github/renovate.json5

Walkthrough

A new toolSettings configuration block has been added to the Renovate configuration file with nodeMaxMemory: 1024 to constrain the Node.js heap memory size during Renovate's tool execution, particularly affecting pnpm lockfile generation. This is a configuration-only change with no modifications to exported or public code entities. Seven lines were added to the file.

Possibly related issues

  • TryGhost/Toast#826: Addresses the same objective of mitigating out-of-memory errors during pnpm lockfile regeneration by setting a memory constraint on Node.js tool execution, complementing alternative mitigation strategies.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: limiting Node heap memory for Renovate's pnpm runs.
Description check ✅ Passed The description provides detailed context about the change, including the problem (memory exhaustion), the solution, rationale, and relevant references.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/renovate-node-max-memory

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@ErisDS ErisDS merged commit 6670b97 into main Apr 12, 2026
29 checks passed
@ErisDS ErisDS deleted the fix/renovate-node-max-memory branch April 12, 2026 06:56
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.45%. Comparing base (fe4ef54) to head (6cce768).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27350      +/-   ##
==========================================
- Coverage   73.46%   73.45%   -0.01%     
==========================================
  Files        1545     1545              
  Lines      123724   123724              
  Branches    14970    14967       -3     
==========================================
- Hits        90897    90887      -10     
- Misses      31827    31837      +10     
  Partials     1000     1000              
Flag Coverage Δ
admin-tests 54.38% <ø> (ø)
e2e-tests 73.45% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant