- Node.js Worker thread question: If I start my Node.js program with --max-old-space-size=5000 How can I limit my Node.js Worker threads to 1gb instead of 5gb? It seems in this case worker.options.resourceLimits won't work cc @jasnell.me @metcoder.dev any idea?
- I'll defer to @jasnell.me to correct me about a possible workaround, but on top of my mind there's none. Nonetheless, I can see that when specifying resourceLimits at the moment of spawning a thread it comes with the overrides, tho unsure if applies at a namespace level.
- Thanks Matteo answered me here and the answer makes sense but for some reason it didn't work. Will need to try on a smaller repro, I'm using Tinypool x.com/sebastienlor...
May 15, 2025 18:22
- Yeah, that has sense. But setting resourceLimits + NODE_OPTIONS="" didn't work? That combination should work (imagine you got the OOM from there)
- I work on a framework, not a single app Node options are expected to be provided by framework users