Skip to content

feat(managers/npm): allow specifying toolSettings.nodeMaxMemory#40957

Draft
jamietanna wants to merge 1 commit intomainfrom
tool/node-heap
Draft

feat(managers/npm): allow specifying toolSettings.nodeMaxMemory#40957
jamietanna wants to merge 1 commit intomainfrom
tool/node-heap

Conversation

@jamietanna
Copy link
Contributor

@jamietanna jamietanna commented Feb 5, 2026

Changes

As noted in #40942, we're seeing an increase in memory usage across
pnpm and yarn users in Mend-hosted apps.

To allow limiting the maximum memory that any node child processes
will use, we can add a new toolSettings.nodeMaxMemory to (hopefully)
mitigate this.

Similar to the toolSettings.jvmMaxMemory, the self-hosted
administrator can set a maximum, which cannot be exceeded by repo-level
configuration.

Context

Please select one of the following:

  • This closes an existing Issue, Closes: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

Warning

TODO

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests, but ran on a real repository, or
  • Both unit tests + ran on a real repository

The public repository:

@jamietanna jamietanna requested a review from viceice February 5, 2026 17:34
Copy link
Collaborator

@RahulGautamSingh RahulGautamSingh left a comment

Choose a reason for hiding this comment

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

feat(managers/npm) 😅

@jamietanna jamietanna changed the title feat(managers/node): allow specifying toolSettings.nodeMaxMemory feat(managers/npm): allow specifying toolSettings.nodeMaxMemory Feb 6, 2026
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

i maybe need to fix containerbase, the shell wrapper currently uses NODE_OPTIONS=--use-openssl-ca 🤔
this env would override it

https://github.com/containerbase/base/blob/6f98ccde5f724cdf5defc7282b61da162f576b7d/src/cli/tools/node/index.ts#L32

{
name: 'nodeMaxMemory',
description:
'Maximum memory in MiB for Node child processes invoked by Renovate. If unset, the Node process will automagically determine the memory limit to use. Repo configuration for this value will be ignored if it exceeds the global configuration for `toolSettings.nodeMaxMemory`',
Copy link
Member

Choose a reason for hiding this comment

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

Don't duplicate this text in docs file above. this will also be added to the docs automatically.

Copy link
Contributor Author

@jamietanna jamietanna Feb 13, 2026

Choose a reason for hiding this comment

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

I prefer a bit more docs wise, as these then go into the JSON Schema, but can trim it down, if you'd prefer?

Copy link
Member

Choose a reason for hiding this comment

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

then ttim the markdown file, not this option here, so we don't duplicate in docs.

Copy link
Member

Choose a reason for hiding this comment

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

then ttim the markdown file, not this option here, so we don't duplicate in docs.

@jamietanna
Copy link
Contributor Author

Re Containerbase: containerbase/base#5962

@jamietanna jamietanna force-pushed the tool/node-heap branch 2 times, most recently from cc01f1f to c4057eb Compare February 13, 2026 10:51
@jamietanna jamietanna requested a review from viceice February 13, 2026 10:52
@jamietanna jamietanna force-pushed the tool/node-heap branch 2 times, most recently from 09e7de9 to 929bbd9 Compare February 13, 2026 10:54
As noted in #40942, we're seeing an increase in memory usage across
`pnpm` and `yarn` users in Mend-hosted apps.

To allow limiting the maximum memory that any `node` child processes
will use, we can add a new `toolSettings.nodeMaxMemory` to (hopefully)
mitigate this.

Similar to the `toolSettings.jvmMaxMemory`, the self-hosted
administrator can set a maximum, which cannot be exceeded by repo-level
configuration.
@viceice
Copy link
Member

viceice commented Feb 13, 2026

Re Containerbase: containerbase/base#5962

seen, it's not working as expected. will answer on PR why.

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