You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow setting --max-heap-size in NODE_OPTIONS #58686
V8 supports this flag for a while now (see 9306), and it's even documented under --v8-options (see). However, it's not yet supported to set it with NODE_OPTIONS environment variable as it is for some other similar flags like --max-old-space-size (see).
For instance, a process will fail with the following error if we try to do this:
♪ NODE_OPTIONS='--max-heap-size=750' node
node: --max-heap-size= is not allowed in NODE_OPTIONS
What is the feature you are proposing to solve the problem?
Allow setting --max-heap-size in the NODE_OPTIONS environment variable.
What alternatives have you considered?
At the moment, we are forced to set this flag directly in the command line, but this is a bit inconvenient when we have to manage several services and want to dynamically calculate the maximum heap size in containerized environments (e.g., based on the memory limit imposed for a pod in a Kubernetes cluster).
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the
never-staleIssues and PRs exempt from automated stale handling.
label or close this issue if it should be closed. If not, the issue will be automatically closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
Activity
bnoordhuis commentedon Jun 14, 2025
Seems unobjectionable. Pull request welcome. See how
--max-old-space-sizeis handled in src/node_options.cc.hpedrorodrigues commentedon Jun 18, 2025
Thanks!
It seems @tannal already opened a pull request. Please let me know if you'll continue working on this or if you need help. 🙏
tannal commentedon Jun 19, 2025
Hi, do we need any tests for this feature/PR?
If so, how or where should I add them?
github-actions commentedon Dec 16, 2025
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the never-staleIssues and PRs exempt from automated stale handling.
label or close this issue if it should be closed. If not, the issue will be automatically closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
tpt-mamuller commentedon Feb 24, 2026
Hey, would love to see this available in future versions, how can we help?
efekrskl commentedon Mar 10, 2026
@tpt-mamuller this was implemented in and it recently got merged ddecee7
Since #58708 was merged and this issue wasn't closed automatically due to a typo in the PR, I'm closing this down.