FlowFuse / nr-launcher

A Laucher for Node-RED that allows settings to be loaded at startup.
Apache License 2.0
5 stars 6 forks source link

If Memory constraints passed to launcher use them to set max-old-space size for npm install #194

Open hardillb opened 9 months ago

hardillb commented 9 months ago

Description

When starting a suspended instance that the user has been adding nodes to over time it may fail because npm consumes more memory than the container allows (k8s/docker)

On these platforms we are now passing the memory/cpu limits to the nr-launcher as a env var, we should be able to use this to set the NODE_OPTIONS env var for the npm process to limit the memory used. This should stop npm getting killed by the container manager.