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
worker_threads resource limits option not working with cluster module #41066
Max old space heap size probably was inherited from parent process (cluster) and resource limits option was ignored.
Additional information
This behavior may cause the memory leak on the worker to be handled incorrectly. Worker process will be killed if old heap space reach cluster process limits, not options I've passed.
When max_old_space_size is concurrently given from both NODE_OPTIONS and the constructor option, the one from NODE_OPTIONS seems to have more priority.
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
Activity
daeyeon commentedon Apr 20, 2022
The primary process above runs with no
NODE_OPTIONS, so that theresourceLimits.maxOldGenerationSizeMbseems to work.A similar case can be observed without cluster module if
--max-old-space-sizeis given inNODE_OPTIONS.Output
When
max_old_space_sizeis concurrently given from bothNODE_OPTIONSand the constructor option, the one fromNODE_OPTIONSseems to have more priority.node/deps/v8/src/heap/heap.cc
Lines 5201 to 5207 in e64613d
github-actions commentedon Jun 25, 2026
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
github-actions commentedon Jul 26, 2026
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.