Pm2: App [app] with id [2] and pid [26519], exited with code [0] via signal [SIGINT]

Created on 3 Jun 2016  ยท  42Comments  ยท  Source: Unitech/pm2

2016-06-01 20:46:28: App [app] with id [13] and pid [12633], exited with code [0] via signal [SIGINT]
2016-06-01 20:46:28: Starting execution sequence in -cluster mode- for app name:app id:13
2016-06-01 20:46:28: App name:app id:13 online
2016-06-01 20:46:28: App name:app id:4 disconnected
2016-06-01 20:46:28: App [app] with id [4] and pid [47284], exited with code [0] via signal [SIGINT]
2016-06-01 20:46:28: Starting execution sequence in -cluster mode- for app name:app id:4
2016-06-01 20:46:29: App name:app id:4 online
2016-06-01 20:46:44: App name:app id:3 disconnected
2016-06-01 20:46:44: App [app] with id [3] and pid [42456], exited with code [0] via signal [SIGINT]
2016-06-01 20:46:44: Starting execution sequence in -cluster mode- for app name:app id:3
2016-06-01 20:46:44: App name:app id:3 online
2016-06-01 20:46:45: App name:app id:2 disconnected
2016-06-01 20:46:45: App [app] with id [2] and pid [47045], exited with code [0] via signal [SIGINT]
2016-06-01 20:46:45: Starting execution sequence in -cluster mode- for app name:app id:2
2016-06-01 20:46:45: App name:app id:2 online
2016-06-01 20:46:49: App name:app id:6 disconnected
2016-06-01 20:46:49: App [app] with id [6] and pid [47326], exited with code [0] via signal [SIGINT]
2016-06-01 20:46:49: Starting execution sequence in -cluster mode- for app name:app id:6
2016-06-01 20:46:49: App name:app id:6 online
2016-06-01 20:46:49: App name:app id:10 disconnected
2016-06-01 20:46:49: App [app] with id [10] and pid [47291], exited with code [0] via signal [SIGINT]
2016-06-01 20:46:49: Starting execution sequence in -cluster mode- for app name:app id:10
2016-06-01 20:46:49: App name:app id:10 online
2016-06-01 20:48:33: App name:app id:2 disconnected
2016-06-01 20:48:33: App [app] with id [2] and pid [47436], exited with code [0] via signal [SIGINT]
2016-06-01 20:48:33: Starting execution sequence in -cluster mode- for app name:app id:2
2016-06-01 20:48:33: App name:app id:2 online
2016-06-01 20:48:33: App name:app id:1 disconnected
2016-06-01 20:48:33: App [app] with id [1] and pid [47215], exited with code [0] via signal [SIGINT]
2016-06-01 20:48:33: Starting execution sequence in -cluster mode- for app name:app id:1
2016-06-01 20:48:33: App name:app id:1 online
2016-06-01 21:44:32: App name:app id:3 disconnected
2016-06-01 21:44:32: App [app] with id [3] and pid [47425], exited with code [0] via signal [SIGINT]
2016-06-01 21:44:32: Starting execution sequence in -cluster mode- for app name:app id:3
2016-06-01 21:44:32: App name:app id:3 online
2016-06-01 22:41:52: App name:app id:1 disconnected
2016-06-01 22:41:52: App [app] with id [1] and pid [47518], exited with code [0] via signal [SIGINT]
2016-06-01 22:41:52: Starting execution sequence in -cluster mode- for app name:app id:1
2016-06-01 22:41:52: App name:app id:1 online
2016-06-01 22:41:55: App name:app id:8 disconnected
2016-06-01 22:41:55: App [app] with id [8] and pid [13399], exited with code [0] via signal [SIGINT]
2016-06-01 22:41:55: Starting execution sequence in -cluster mode- for app name:app id:8
2016-06-01 22:41:55: App name:app id:8 online
2016-06-01 23:11:27: App name:app id:11 disconnected
2016-06-01 23:11:27: App [app] with id [11] and pid [47254], exited with code [0] via signal [SIGINT]
2016-06-01 23:11:27: Starting execution sequence in -cluster mode- for app name:app id:11
2016-06-01 23:11:28: App name:app id:11 online
2016-06-02 10:32:31: App name:app id:12 disconnected
2016-06-02 10:32:31: App [app] with id [12] and pid [40234], exited with code [0] via signal [SIGINT]
2016-06-02 10:32:31: Starting execution sequence in -cluster mode- for app name:app id:12
2016-06-02 10:32:31: App name:app id:12 online
2016-06-02 11:11:13: App name:app id:7 disconnected
2016-06-02 11:11:13: App [app] with id [7] and pid [47386], exited with code [0] via signal [SIGINT]
2016-06-02 11:11:13: Starting execution sequence in -cluster mode- for app name:app id:7
2016-06-02 11:11:13: App name:app id:7 online
2016-06-02 11:11:16: App name:app id:6 disconnected
2016-06-02 11:11:16: App [app] with id [6] and pid [47447], exited with code [0] via signal [SIGINT]
2016-06-02 11:11:16: Starting execution sequence in -cluster mode- for app name:app id:6
2016-06-02 11:11:16: App name:app id:6 online
2016-06-02 12:29:17: App name:app id:0 disconnected
2016-06-02 12:29:17: App [app] with id [0] and pid [47317], exited with code [0] via signal [SIGINT]
2016-06-02 12:29:17: Starting execution sequence in -cluster mode- for app name:app id:0
2016-06-02 12:29:17: App name:app id:0 online
2016-06-02 14:24:11: App name:app id:2 disconnected
2016-06-02 14:24:11: App [app] with id [2] and pid [47511], exited with code [0] via signal [SIGINT]
2016-06-02 14:24:11: Starting execution sequence in -cluster mode- for app name:app id:2
2016-06-02 14:24:11: App name:app id:2 online
2016-06-02 14:57:33: App name:app id:5 disconnected
2016-06-02 14:57:33: App [app] with id [5] and pid [47302], exited with code [0] via signal [SIGINT]
2016-06-02 14:57:33: Starting execution sequence in -cluster mode- for app name:app id:5
2016-06-02 14:57:33: App name:app id:5 online
2016-06-02 15:15:23: App name:app id:13 disconnected
2016-06-02 15:15:23: App [app] with id [13] and pid [47393], exited with code [0] via signal [SIGINT]
2016-06-02 15:15:23: Starting execution sequence in -cluster mode- for app name:app id:13
2016-06-02 15:15:23: App name:app id:13 online
2016-06-02 15:15:36: App name:app id:6 disconnected
2016-06-02 15:15:36: App [app] with id [6] and pid [64319], exited with code [0] via signal [SIGINT]
2016-06-02 15:15:36: Starting execution sequence in -cluster mode- for app name:app id:6
2016-06-02 15:15:36: App name:app id:12 disconnected
2016-06-02 15:15:36: App [app] with id [12] and pid [63616], exited with code [0] via signal [SIGINT]
2016-06-02 15:15:36: Starting execution sequence in -cluster mode- for app name:app id:12
2016-06-02 15:15:36: App name:app id:6 online
2016-06-02 15:15:36: App name:app id:12 online
2016-06-02 15:17:24: App name:app id:13 disconnected
2016-06-02 15:17:24: App [app] with id [13] and pid [68616], exited with code [0] via signal [SIGINT]
2016-06-02 15:17:24: Starting execution sequence in -cluster mode- for app name:app id:13
2016-06-02 15:17:24: App name:app id:13 online
2016-06-02 15:17:52: App name:app id:7 disconnected
2016-06-02 15:17:52: App [app] with id [7] and pid [64308], exited with code [0] via signal [SIGINT]
2016-06-02 15:17:52: Starting execution sequence in -cluster mode- for app name:app id:7
2016-06-02 15:17:52: App name:app id:7 online
2016-06-02 15:17:57: App name:app id:9 disconnected
2016-06-02 15:17:57: App [app] with id [9] and pid [12429], exited with code [0] via signal [SIGINT]
2016-06-02 15:17:57: Starting execution sequence in -cluster mode- for app name:app id:9
2016-06-02 15:17:57: App name:app id:9 online
2016-06-02 15:18:08: App name:app id:7 disconnected
2016-06-02 15:18:08: App [app] with id [7] and pid [68705], exited with code [0] via signal [SIGINT]
2016-06-02 15:18:08: Starting execution sequence in -cluster mode- for app name:app id:7
2016-06-02 15:18:08: App name:app id:7 online
2016-06-02 15:18:12: App name:app id:1 disconnected
2016-06-02 15:18:12: App [app] with id [1] and pid [49526], exited with code [0] via signal [SIGINT]
2016-06-02 15:18:12: Starting execution sequence in -cluster mode- for app name:app id:1
2016-06-02 15:18:12: App name:app id:1 online
2016-06-02 15:18:15: App name:app id:11 disconnected
2016-06-02 15:18:15: App [app] with id [11] and pid [50084], exited with code [0] via signal [SIGINT]
2016-06-02 15:18:15: Starting execution sequence in -cluster mode- for app name:app id:11
2016-06-02 15:18:15: App name:app id:10 disconnected
2016-06-02 15:18:15: App [app] with id [10] and pid [47454], exited with code [0] via signal [SIGINT]
2016-06-02 15:18:15: Starting execution sequence in -cluster mode- for app name:app id:10

run node.js by pm2,but often restart :exited with code [0] via signal [SIGINT]
why?

host server have lots of memory and cpu:

~$df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       40G  9.8G   28G  27% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            7.9G  4.0K  7.9G   1% /dev
tmpfs           1.6G  380K  1.6G   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            7.9G     0  7.9G   0% /run/shm
none            100M     0  100M   0% /run/user
~$ free -m
 total       used       free     shared    buffers     cached
Mem:         16035       8177       7857          0        174       3672
-/+ buffers/cache:       4331      11704
Swap:            0          0          0

~$ node -v
v5.1.1
~$ npm -v
3.3.12
~$ pm2 -v
1.0.0

Most helpful comment

I've just had the same symptons. I was using a config file not ending with '.config.js'.

All 42 comments

need help~:(

Check your app logs.

config file:

{
  "apps": [
    {
      "name": "app",
      "script": "app.js",
      "error_file": "../log/error.log",
      "out_file": "../log/access.log",
      "merge_logs": true,
      "cwd": "./",
      "instances": 0,
      "exec_mode"  : "cluster_mode",
      "env": {
        "NODE_ENV": "production"
      }
    }
  ]
}

@soyuka how can i do , do not have error:(

which reason can produce this error:"exited with code [0] via signal [SIGINT]"

~$ pm2 -v
1.0.0

i run : pm2 update, then run:pm2 -v ,it is also 1.0.0,can not update?

image

image

To update pm2:
npm install pm2 -g

If app exited with code 0 it's probably your script that exits, so I can't help you.

your app logs can be found by launching pm2 describe app or inside ~/.pm2/logs/. Also, you can type pm2 logs

same issue ,anyone can help me?
image

Hi! Same problem here. App works fine standalone, but constantly crashes with
"App [app] with id [0] and pid [21000], exited with code [0] via signal [SIGINT]",
app logs are clean. Problem reproduces on ubuntu and windows machines.

Same experience here. I noticed that application can start without problem in fork mode, but I have your problem in cluster mode, even with only 1 node
pm2 start -i 1 npm --name "app" -- run server

Hi, I have an app that runs in several EC2 instances, with the same OS configuration (CentOS 7, same node (4.4.5) and pm2 (1.1.3) version. App fails just in one instance. When I start the app in fork mode, it consumes a lot of memory and eventually gets killed, but if I start it in cluster mode, it restarts immediately, error logs show no messages.

Update pm2 to latest version : npm install pm2 -g.

Do you use watch feature (via CLI or process config file)?

Could you install latest pm2:

$ npm install pm2@next -g
$ pm2 update

We've added unhandledRejection listener on that version

Got the same problem in CentOS.
Version info

pm2 2.0.18
node v6.4.0

Stack info:

[xxxxx   dist]# pm2 start server.js --no-daemon
pm2 launched in no-daemon mode (you can add DEBUG="*" env variable to get more messages)
[PM2] Starting /root/bolang-backend/dist/server.js in fork_mode (1 instance)
[PM2] Done.
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ App name   โ”‚ id โ”‚ mode โ”‚ pid  โ”‚ status  โ”‚ restart โ”‚ uptime โ”‚ cpu โ”‚ mem       โ”‚ watching โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ api        โ”‚ 3  โ”‚ fork โ”‚ 0    โ”‚ errored โ”‚ 16      โ”‚ 0      โ”‚ 0%  โ”‚ 0 B       โ”‚ disabled โ”‚
โ”‚ rcu-server โ”‚ 0  โ”‚ fork โ”‚ 4619 โ”‚ online  โ”‚ 0       โ”‚ 3m     โ”‚ 0%  โ”‚ 34.3 MB   โ”‚ disabled โ”‚
โ”‚ server     โ”‚ 4  โ”‚ fork โ”‚ 5878 โ”‚ online  โ”‚ 0       โ”‚ 0s     โ”‚ 0%  โ”‚ 5.8 MB    โ”‚ disabled โ”‚
โ”‚ web        โ”‚ 1  โ”‚ fork โ”‚ 4625 โ”‚ online  โ”‚ 0       โ”‚ 3m     โ”‚ 0%  โ”‚ 25.0 MB   โ”‚ disabled โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
 Use `pm2 show <id|name>` to get more details about an app
--no-daemon option enabled = do not exit pm2 API
PM2 daemon PID = 4607
[STREAMING] Now streaming realtime logs for [all] processes
16:16:18 PM2        | App [server] with id [4] and pid [5878], exited with code [0] via signal [SIGINT]
16:16:18 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:18 PM2        | App name:server id:4 online
16:16:19 PM2        | App [server] with id [4] and pid [5904], exited with code [0] via signal [SIGINT]
16:16:19 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:19 PM2        | App name:server id:4 online
16:16:19 PM2        | App [server] with id [4] and pid [5930], exited with code [0] via signal [SIGINT]
16:16:19 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:19 PM2        | App name:server id:4 online
16:16:20 PM2        | App [server] with id [4] and pid [5956], exited with code [0] via signal [SIGINT]
16:16:20 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:20 PM2        | App name:server id:4 online
16:16:21 PM2        | App [server] with id [4] and pid [5982], exited with code [0] via signal [SIGINT]
16:16:21 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:21 PM2        | App name:server id:4 online
16:16:21 PM2        | App [server] with id [4] and pid [6008], exited with code [0] via signal [SIGINT]
16:16:21 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:21 PM2        | App name:server id:4 online
16:16:22 PM2        | App [server] with id [4] and pid [6039], exited with code [0] via signal [SIGINT]
16:16:22 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:22 PM2        | App name:server id:4 online
16:16:22 PM2        | App [server] with id [4] and pid [6065], exited with code [0] via signal [SIGINT]
16:16:22 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:22 PM2        | App name:server id:4 online
16:16:23 PM2        | App [server] with id [4] and pid [6091], exited with code [0] via signal [SIGINT]
16:16:23 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:23 PM2        | App name:server id:4 online
16:16:24 PM2        | App [server] with id [4] and pid [6117], exited with code [0] via signal [SIGINT]
16:16:24 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:24 PM2        | App name:server id:4 online
16:16:24 PM2        | App [server] with id [4] and pid [6143], exited with code [0] via signal [SIGINT]
16:16:24 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:24 PM2        | App name:server id:4 online
16:16:25 PM2        | App [server] with id [4] and pid [6169], exited with code [0] via signal [SIGINT]
16:16:25 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:25 PM2        | App name:server id:4 online
16:16:26 PM2        | App [server] with id [4] and pid [6195], exited with code [0] via signal [SIGINT]
16:16:26 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:26 PM2        | App name:server id:4 online
16:16:27 PM2        | App [server] with id [4] and pid [6221], exited with code [0] via signal [SIGINT]
16:16:27 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:27 PM2        | App name:server id:4 online
16:16:27 PM2        | App [server] with id [4] and pid [6279], exited with code [0] via signal [SIGINT]
16:16:27 PM2        | Starting execution sequence in -fork mode- for app name:server id:4
16:16:27 PM2        | App name:server id:4 online
16:16:28 PM2        | App [server] with id [4] and pid [6305], exited with code [0] via signal [SIGINT]
16:16:28 PM2        | Script /root/bolang-backend/dist/server.js had too many unstable restarts (16). Stopped. "errored"

Same issue but not that bad. Only in some circumstances the node app disconnects this way...

Try to update pm2 with DEBUG=* as follow:

DEBUG="*" pm2 update

It worked for me (pm2 version 2.0.18). Related issue #1027.

Similar issue but with bash scripts in CentOS here:

$ pm2 --version && node --version
2.0.18
v6.5.0
$ cat /etc/*elease
CentOS Linux release 7.1 (Core)

I have a script that hits a local URL once a day. It should start, make a few POSTs, then sleep. I have cron set up to restart it every day at 1AM (I tried pm2's cron but abandoned it because of this issue, thinking that was the problem).

The problem is that it runs, then gets restarted, meaning it's doing far more work than it should be.

Script (heavily edited to protect IP):

#!/usr/bin/env bash

acct="XYZ"
query="account=$acct"

for table in 'a' 'b' 'c'
do
  server="localhost"
  yest=$(date +%Y-%m-%d -d "yesterday") # this line will fail on OSX
  url="http://$server:5566/export/costanza/$table/$yest?$query"
  echo "`date +%Y-%m-%d:%H:%M:%S`: starting date range: ${yest} to now for table ${table}"
  echo "      curl -s -X POST \"$url\""
  curl -s -X POST "$url"
done

pm2 logs (grepped for that app), all I see is a bunch of SIGINTs. No idea why it would happen that way.

2016-10-28 18:36:03: App [dataload-daily] with id [14] and pid [62102], exited with code [7] via signal [SIGINT]
2016-10-28 18:36:03: Starting execution sequence in -fork mode- for app name:dataload-daily id:14
Fri, 28 Oct 2016 18:36:03 GMT pm2:fork_mode stds: {"out":"/opt/cdk/.pm2/logs/dataload-daily-out-14.log","err":"/opt/cdk/.pm2/logs/dataload-daily-error-14.log"}
2016-10-28 18:36:03: App name:dataload-daily id:14 online
2016-10-28 18:38:37: App [dataload-daily] with id [14] and pid [62184], exited with code [52] via signal [SIGINT]
2016-10-28 18:38:37: Starting execution sequence in -fork mode- for app name:dataload-daily id:14
Fri, 28 Oct 2016 18:38:37 GMT pm2:fork_mode stds: {"out":"/opt/cdk/.pm2/logs/dataload-daily-out-14.log","err":"/opt/cdk/.pm2/logs/dataload-daily-error-14.log"}
2016-10-28 18:38:37: App name:dataload-daily id:14 online
2016-10-28 18:40:56: App [dataload-daily] with id [14] and pid [9306], exited with code [52] via signal [SIGINT]
2016-10-28 18:40:56: Starting execution sequence in -fork mode- for app name:dataload-daily id:14
Fri, 28 Oct 2016 18:40:56 GMT pm2:fork_mode stds: {"out":"/opt/cdk/.pm2/logs/dataload-daily-out-14.log","err":"/opt/cdk/.pm2/logs/dataload-daily-error-14.log"}
2016-10-28 18:40:56: App name:dataload-daily id:14 online

It's restarting every 2-5 minutes. This effectively means that I am unable to use pm2 to run scripts because it is too unreliable.

This is happening to me on a single single app out of 7 that are set up and running with pm2 deploy.

Exist via SIGINT with code "0" 16 times and then pm2 says too many restarts. No logs, no other errors. No problem starting the app with normal pm2.

It seems like maybe pm2 deploy is not honoring the cwd option? pm2 show says the exec cwd is main checkout directory, not what's set up in ecosystem.config.js.

I've just had the same symptons. I was using a config file not ending with '.config.js'.

Hey @c0bra and @ecdpalma try this technique to track down where the SIGINT etc is coming from. I have a suspicion this is a bug that is only happening on some OSs.

Why was this closed?

Because the issue isn't related to PM2, like said above the application is somewhat killed/ended by something but definitely not PM2.

All you said was "Update pm2 to latest version : npm install pm2 -g". It's unclear whether that solved the issue. Was this bug fixed after 2.0.18? Because that's what version I saw it in.

I said that in the first place because people were always running with pm2 v1 and as i said just above, pm2 doesn't kill the process except if someone asked for it, so the problem might come from elsewhere but not PM2.

@vmarchaud I run pm2 in docker , and the sysdig does not work in it.

PM2 | 2017-12-07 14:34:13: Starting execution sequence in -fork mode- for app name:cube-archive-service id:2
PM2 | 2017-12-07 14:34:13: App name:cube-archive-service id:2 online
PM2 | 2017-12-07 14:34:13: App [cube-report-service] with id [1] and pid [15635], exited with code [0] via signal [SIGILL]
PM2 | 2017-12-07 14:34:13: Starting execution sequence in -fork mode- for app name:cube-report-service id:1
PM2 | 2017-12-07 14:34:13: App name:cube-report-service id:1 online
PM2 | 2017-12-07 14:34:14: App [cube-report-service] with id [1] and pid [15671], exited with code [0] via signal [SIGILL]
PM2 | 2017-12-07 14:34:14: Starting execution sequence in -fork mode- for app name:cube-report-service id:1
PM2 | 2017-12-07 14:34:14: App name:cube-report-service id:1 online
PM2 | 2017-12-07 14:34:14: App [cube-report-service] with id [1] and pid [15677], exited with code [0] via signal [SIGILL]
PM2 | 2017-12-07 14:34:14: Script /home/cube/cube_services/cube-report-service/main.js had too many unstable restarts (16). Stopped. "errored"
PM2 | 2017-12-07 14:34:14: App [cube-archive-service] with id [2] and pid [15665], exited with code [0] via signal [SIGILL]
PM2 | 2017-12-07 14:34:14: Starting execution sequence in -fork mode- for app name:cube-archive-service id:2
PM2 | 2017-12-07 14:34:14: App name:cube-archive-service id:2 online
PM2 | 2017-12-07 14:34:14: App [cube-archive-service] with id [2] and pid [15685], exited with code [0] via signal [SIGILL]
PM2 | 2017-12-07 14:34:14: Script /home/cube/cube_services/cube-archive-service/index.js had too many unstable restarts (16). Stopped. "errored"

ubuntu 14.04 pm2 2.8.0 failed
ubuntu 16.04 pm2 2.8.0 works

PM2 Automatically restart with following Logs. Do not Get exact idea what happen here?

PM2 | 2017-12-12 08:08:41: Starting execution sequence in -fork mode- for app name:cluster id:1
PM2 | 2017-12-12 08:08:41: App name:cluster id:1 online
PM2 | 2017-12-12 13:19:22: Stopping app:master id:0
PM2 | 2017-12-12 13:19:22: App [master] with id [0] and pid [24871], exited with code [0] via signal [SIGINT]
PM2 | 2017-12-12 13:19:23: pid=24871 msg=process killed
PM2 | 2017-12-12 13:19:26: Starting execution sequence in -fork mode- for app name:master id:0
PM2 | 2017-12-12 13:19:26: App name:master id:0 online
PM2 | 2017-12-13 13:16:09: Stopping app:master id:0
PM2 | 2017-12-13 13:16:09: App [master] with id [0] and pid [29810], exited with code [0] via signal [SIGINT]
PM2 | 2017-12-13 13:16:09: pid=29810 msg=process killed
PM2 | 2017-12-13 13:16:13: Starting execution sequence in -fork mode- for app name:master id:0
PM2 | 2017-12-13 13:16:13: App name:master id:0 online
PM2 | 2017-12-13 14:31:55: App [master] with id [0] and pid [19450], exited with code [1] via signal [SIGINT]
PM2 | 2017-12-13 14:31:55: Starting execution sequence in -fork mode- for app name:master id:0
PM2 | 2017-12-13 14:31:55: App name:master id:0 online

I am also getting the same issue on the ec2 ubuntu machine. It starting in cluster mode after few minute, the second instance status showing as errored.
It is running on my local machine perfectly(OS X).
App [app] with id [2] and pid [26519], exited with code [0] via signal [SIGINT]

Hey,
I've had the same issue.

The following StackOverflow thread helped me out.
https://stackoverflow.com/questions/30650366/pm2-start-app-js-is-exiting-after-15-restarts

Try to start your application with:
pm2 start ./bin/www instead of pm2 start app.js

I just had the same problem because my JS config file was not properly named *.config.js (mine was pm2-config.js instead of pm2.config.js), so pm2 was considering my config file as my app :man_facepalming:

Remove hyphen from the app name if any!
I faced the exact same problem. I had a hyphen ( "-" ) in the name of the app. After trying everything, I removed this hyphen and all worked fine after that.

The reason this was an issue for me was because I was using a JavaScript configuration object but failed to end the filename with .config.js as it states below the example. Adding the .config fixed the issue for me.

Another thing to note is that if you have an image in your pm2 list named the same thing as your app name in your config file, you need to pm2 delete [appName], otherwise it keeps using the previous (failing) configuration.

'pm2 update' command seems to have fixed it for me. Although it did not update the pm2 version but it seems to have got rid of this problem.

I removed hyphen from app name in config file and it worked for me.
I'm running pm2 3.1.2

@tanerochris, thanks for the info, I was about to test that myself because I stumbled onto this problem as well.

Ubuntu 18.04/ node v8.15.1/ pm2 3.4.0
tried to run the node-red had the same issue, I had to point to the red.js (node_modules/node-red/red.js) to start it the right way, kind of strange since they tell to run it like pm2 start node-red...

Several people have reported issues that ended up being having a filename suffix other than .config.js (we just got bit by this because we were trying to use pm2.config.qa.js -- this really should be included in the documentation!

I just had this, pm2 logs revealed that it did not have permission to create the log files in the log dirs I had set in the config file.

I've just had the same symptons. I was using a config file not ending with '.config.js'.
This is a great help

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lefam picture lefam  ยท  3Comments

liujb picture liujb  ยท  3Comments

jubairsaidi picture jubairsaidi  ยท  3Comments

chaos-git picture chaos-git  ยท  3Comments

getvega picture getvega  ยท  3Comments