petruisfan / node-supervisor

Other
3.76k stars 260 forks source link

How to add node --max-old-space-size flag? #210

Open gsc-dev opened 7 years ago

gsc-dev commented 7 years ago

Tried to use --exec option without sucess:

supervisor --exec 'node --max-old-space-size=1000' ./index.js

Error:

Running node-supervisor with
  program './index.js'
  --watch '.'
  --extensions 'node,js'
  --exec 'node --max-old-space-size=1000'

Starting child process with 'node --max-old-space-size=1000 ./index.js'
Watching directory '/Users/ronaldo.pontes/code/tracking-proxy' for changes.
Press rs for restarting the process.
Parent process exiting, terminating child...
events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: spawn node --max-old-space-size=1000 ENOENT
    at exports._errnoException (util.js:1050:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
    at Module.runMain (module.js:607:11)
    at run (bootstrap_node.js:427:7)
    at startup (bootstrap_node.js:151:9)
    at bootstrap_node.js:542:3
rixo commented 7 years ago

This worked for me:

supervisor -- --max-old-space-size=1000 ./index.js
APPLLEJN commented 6 years ago

the same problem,how to fix it

mariohmol commented 5 years ago

any updates adding this flag with supervisord? shouldnt this be on .conf file?