title: Spawn memory leak issue
body: <p>I am not sure how I go about fixing this issue, for some reason, just every now and again my nodeJS app seems to fire a spawn error which I can't figure out how to fix or resolve.</p>
  <pre><code>Error: spawn ENOMEM
      at ChildProcess.spawn (internal/child_process.js:406:11)
      at spawn (child_process.js:553:9)
      at Object.execFile (child_process.js:237:17)
      at exec (child_process.js:158:25)
      at CheckIP (/(PATH)/(APPNAME)/app.js:57:3)
      at Layer.handle [as handle_request] (/(PATH)/(APPNAME)/node_modules/express/lib/router/layer.js:95:5)
      at trim_prefix (/(PATH)/(APPNAME)/node_modules/express/lib/router/index.js:317:13)
      at /(PATH)/(APPNAME)/node_modules/express/lib/router/index.js:284:7
      at Function.process_params (/(PATH)/(APPNAME)/node_modules/express/lib/router/index.js:335:12)
      at next (/(PATH)/(APPNAME)/node_modules/express/lib/router/index.js:275:10)
      at cookieParser (/(PATH)/(APPNAME)/node_modules/cookie-parser/index.js:71:5)
      at Layer.handle [as handle_request] (/(PATH)/(APPNAME)/node_modules/express/lib/router/layer.js:95:5)
      at trim_prefix (/(PATH)/(APPNAME)/node_modules/express/lib/router/index.js:317:13)
      at /(PATH)/(APPNAME)/node_modules/express/lib/router/index.js:284:7
      at Function.process_params (/(PATH)/(APPNAME)/node_modules/express/lib/router/index.js:335:12)
      at next (/(PATH)/(APPNAME)/node_modules/express/lib/router/index.js:275:10)
  </code></pre>
  <p>I am wondering is it possible to have a script that watches for this error and if it happens run:</p>
  <pre><code>systemctl stop  APPNAME
  systemctl start  APPNAME
  </code></pre>
  <p>I know that does not fix the problem but until I can work out what the issue is I need a temp solution.</p>
  <p>from everything I am reading seems it that the spawn is a memory thing? Not 100% sure, if that is the case could I have a script that releases memory as the app continues to run?Swap</p>