On 27/10/2026 19:21, Mike Pumford wrote:
Ran into a similar issue with one of my own nodejs projects and it looks like the real underlying issue here is the max data segment size that I have in login.conf.I set the environment variableNODE_OPTIONS to '--max-old-space-size=8192' globally before starting the script which builds my packages. In modern node system that is 8GB of old GC objects. Modern node sizes this on pointer size and reported system memory size so for very large systems it might work without it.
nodejs sizes the heap based on the max data segment size set by ulimit. Which I had set to a tiny 512MB meaning nodejs ended up with a 256MB heap. Not unreasonable given the ulimit in play so I guess the ultimate fix is a ulimit -d wrapped around my build script.
Mike