pm2 fait la même chose que forever normalement
Voila les logs depuis le lancement de l'appli :
2017-12-03 14:18:07: Starting execution sequence in -fork mode- for app name:mmtd-api id:1
2017-12-03 14:18:07: App name:mmtd-api id:1 online
2017-12-04 17:31:12: [PM2][WORKER] Error caught by domain:
Error: spawn ENOMEM
at _errnoException (util.js:1021:11)
at ChildProcess.spawn (internal/child_process.js:325:11)
at exports.spawn (child_process.js:494:9)
at Object.exports.execFile (child_process.js:209:15)
at exports.exec (child_process.js:139:18)
at getBranch (/root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/lib/git.js:53:5)
at fn (/root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:746:34)
at /root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:1213:16
at /root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:166:37
at /root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:706:43
2017-12-04 17:31:42: [PM2][WORKER] Error caught by domain:
Error: spawn ENOMEM
at _errnoException (util.js:1021:11)
at ChildProcess.spawn (internal/child_process.js:325:11)
at exports.spawn (child_process.js:494:9)
at Object.exports.execFile (child_process.js:209:15)
at exports.exec (child_process.js:139:18)
at getStaged (/root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/lib/git.js:43:5)
at fn (/root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:746:34)
at /root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:1213:16
at /root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:166:37
at /root/.nvm/versions/node/v8.7.0/lib/node_modules/pm2/node_modules/vizion/node_modules/async/lib/async.js:706:43
<--- Last few GCs --->
[25633:0x241d0d0] 237639080 ms: Scavenge 14.6 (21.9) -> 13.6 (21.9) MB, 11.2 / 1.1 ms allocation failure
[25633:0x241d0d0] 237763057 ms: Scavenge 14.6 (21.9) -> 13.7 (21.9) MB, 33.7 / 1.9 ms allocation failure
[25633:0x241d0d0] 237890960 ms: Scavenge 14.6 (21.9) -> 13.6 (21.9) MB, 6.0 / 0.8 ms allocation failure
[25633:0x241d0d0] 238017535 ms: Scavenge 14.6 (21.9) -> 13.6 (21.9) MB, 11.7 / 0.4 ms allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x264e8fca5e71 <JSObject>
0: builtin exit frame: parse(this=0x264e8fc88fd1 <Object map = 0x397b11c82ba1>,0x32071757fe31 <String[91]: {"type":"axm:monitor","data":{"Loop delay":{"value":"1.09ms","agg_type":"avg","alert":{}}}}>)
1: onread [internal/child_process.js:~453] [pc=0x31d4730f3e8c](this=0x10200983a0a9 <Pipe map = 0x36186559da59>,nread=92,pool=0x32071757fcc9 <Uint8Array map = 0x3618655b1591>,recvHandle=0xe...
FATAL ERROR: Committing semi space failed. Allocation failed - process out of memory
1: node::Abort() [PM2 v2.8.0: God Daemon (/root/.pm2)]
2: 0x1217ecc [PM2 v2.8.0: God Daemon (/root/.pm2)]
3: v8::Utils::ReportOOMFailure(char const*, bool) [PM2 v2.8.0: God Daemon (/root/.pm2)]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [PM2 v2.8.0: God Daemon (/root/.pm2)]
5: v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [PM2 v2.8.0: God Daemon (/root/.pm2)]
6: v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [PM2 v2.8.0: God Daemon (/root/.pm2)]
7: v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [PM2 v2.8.0: God Daemon (/root/.pm2)]
8: v8::internal::Handle<v8::internal::String> v8::internal::JsonParser<false>::ScanJsonString<false>() [PM2 v2.8.0: God Daemon (/root/.pm2)]
9: v8::internal::JsonParser<false>::ParseJsonValue() [PM2 v2.8.0: God Daemon (/root/.pm2)]
10: v8::internal::JsonParser<false>::ParseJsonObject() [PM2 v2.8.0: God Daemon (/root/.pm2)]
11: v8::internal::JsonParser<false>::ParseJsonValue() [PM2 v2.8.0: God Daemon (/root/.pm2)]
12: v8::internal::JsonParser<false>::ParseJsonObject() [PM2 v2.8.0: God Daemon (/root/.pm2)]
13: v8::internal::JsonParser<false>::ParseJsonValue() [PM2 v2.8.0: God Daemon (/root/.pm2)]
14: v8::internal::JsonParser<false>::ParseJsonObject() [PM2 v2.8.0: God Daemon (/root/.pm2)]
15: v8::internal::JsonParser<false>::ParseJsonValue() [PM2 v2.8.0: God Daemon (/root/.pm2)]
16: v8::internal::JsonParser<false>::ParseJson() [PM2 v2.8.0: God Daemon (/root/.pm2)]
17: v8::internal::Builtin_JsonParse(int, v8::internal::Object**, v8::internal::Isolate*) [PM2 v2.8.0: God Daemon (/root/.pm2)]
18: 0x31d472f8441d
2017-12-04 21:55:53: ===============================================================================
2017-12-04 21:55:53: --- New PM2 Daemon started ----------------------------------------------------
2017-12-04 21:55:53: Time : Mon Dec 04 2017 21:55:53 GMT+0100 (CET)
2017-12-04 21:55:53: PM2 version : 2.8.0
2017-12-04 21:55:53: Node.js version : 8.7.0
2017-12-04 21:55:53: Current arch : x64
2017-12-04 21:55:53: PM2 home : /root/.pm2
2017-12-04 21:55:53: PM2 PID file : /root/.pm2/pm2.pid
2017-12-04 21:55:53: RPC socket file : /root/.pm2/rpc.sock
2017-12-04 21:55:53: BUS socket file : /root/.pm2/pub.sock
2017-12-04 21:55:53: Application log path : /root/.pm2/logs
2017-12-04 21:55:53: Process dump file : /root/.pm2/dump.pm2
2017-12-04 21:55:53: Concurrent actions : 2
2017-12-04 21:55:53: SIGTERM timeout : 1600
2017-12-04 21:55:53: ===============================================================================