Title: Allow setting `--max-heap-size` in `NODE_OPTIONS` · Issue #58686 · nodejs/node · GitHub
Open Graph Title: Allow setting `--max-heap-size` in `NODE_OPTIONS` · Issue #58686 · nodejs/node
X Title: Allow setting `--max-heap-size` in `NODE_OPTIONS` · Issue #58686 · nodejs/node
Description: What is the problem this feature will solve? 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 f...
Open Graph Description: What is the problem this feature will solve? 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...
X Description: What is the problem this feature will solve? 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 w...
Opengraph URL: https://github.com/nodejs/node/issues/58686
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow setting `--max-heap-size` in `NODE_OPTIONS`","articleBody":"### What is the problem this feature will solve?\n\nV8 supports this flag for a while now (see [9306](https://issues.chromium.org/issues/42212488)), and it's even documented under `--v8-options` ([see](https://github.com/nodejs/node/blob/v24.2.0/deps/v8/src/flags/flag-definitions.h#L2062-L2066)). 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](https://github.com/nodejs/node/blob/v24.2.0/src/node_options.cc#L1073)).\n\nFor instance, a process will fail with the following error if we try to do this:\n```\n♪ NODE_OPTIONS='--max-heap-size=750' node\nnode: --max-heap-size= is not allowed in NODE_OPTIONS\n```\n\n### What is the feature you are proposing to solve the problem?\n\nAllow setting `--max-heap-size` in the `NODE_OPTIONS` environment variable.\n\n### What alternatives have you considered?\n\nAt 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).","author":{"url":"https://github.com/hpedrorodrigues","@type":"Person","name":"hpedrorodrigues"},"datePublished":"2025-06-12T03:19:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/58686/node/issues/58686"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:edeaad85-62b5-aec6-6e47-6453e3581637 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 82BE:135B7:3C8A0C:518E84:6A4D9FC5 |
| html-safe-nonce | 2de0c1abeb0fc92a2a9281e0fe34d40bab41b802ffceebe416de96cba349a128 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkJFOjEzNUI3OjNDOEEwQzo1MThFODQ6NkE0RDlGQzUiLCJ2aXNpdG9yX2lkIjoiODE4MzU5MTEwMDg2ODMwNDgzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cba1cda45d996f74d8b5b9c127f5b87674cda687ced28f07e54a7e28b6ef72bc |
| hovercard-subject-tag | issue:3138681726 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/58686/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e5c8524935b9abd8cf7daadeb8a1095f1a7dd6ca7c4c3bb062126b9591f7b72a/nodejs/node/issues/58686 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e5c8524935b9abd8cf7daadeb8a1095f1a7dd6ca7c4c3bb062126b9591f7b72a/nodejs/node/issues/58686 |
| og:image:alt | What is the problem this feature will solve? 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hpedrorodrigues |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7f13faa65cccc9b729d674da83335d5dcfdfd193 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width