Last couple of weeks, I am struggling with pm2 100% CPU usage which hangs my node server.
I tried reading logs but I didn't find any issue there.
My node version: 6.9.1
PM2 is : 2.4.4.
OS: Ubuntu 14.04
On an average my cpu usage is : ~5
Manually I am restarting all apps - pm2 restart all.
pm2.log:
fluid_admin@instance-2:~$ tail -15 .pm2/pm2.log
2017-04-12 09:55:30: Starting execution sequence in -fork mode- for app name:fluid-prod id:0 2017-04-12 09:55:30: App name:fluid-prod id:0 online 2017-04-14 13:53:21: Stopping app:fluid-prod id:0 2017-04-14 13:53:21: Stopping app:nedbserver id:1 2017-04-14 13:53:21: App [nedbserver] with id [1] and pid [32557], exited with code [0] via signal [SIGINT] 2017-04-14 13:53:21: pid=32574 msg=failed to kill - retrying in 100ms 2017-04-14 13:53:21: pid=32557 msg=process killed 2017-04-14 13:53:21: Starting execution sequence in -fork mode- for app name:nedbserver id:1 2017-04-14 13:53:21: App [fluid-prod] with id [0] and pid [32574], exited with code [0] via signal [SIGINT] 2017-04-14 13:53:21: App name:nedbserver id:1 online 2017-04-14 13:53:21: pid=32574 msg=process killed 2017-04-14 13:53:21: Starting execution sequence in -fork mode- for app name:fluid-prod id:0 2017-04-14 13:53:21: App name:fluid-prod id:0 online
App is running on GAE, OS is : Ubuntu 14.04.
I have moved from forever to pm2 6 months back. till recent time, it was working file but now I am frequently having this issue.
I don't know deal this problem. Can some one help me how to debug this issue.
It happened again. Output of TOP commands
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25059 fluid_a+ 20 0 1260364 105532 8236 R 99.7 17.5 58:27.27 node fluid/server/tools/www +
1 root 20 0 33520 3208 1792 S 0.0 0.5 0:04.82 /sbin/init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 [kthreadd]
Script to start my app:
pm2 stop fluid-prod
pm2 start \
-n fluid-prod \
-e /path/to/fluid-error.log \
-o /path/to/fluid-out.log \
$(dirname $0)/www -- --max-memory-restart 200M --env=production
chokidar
or watching file system changes? – Kimberlipm2 ls
says watching is disabled for all my projects. – Breen# pm2 management pm2 stop fluid-prod pm2 start \ -n fluid-prod \ -e /home/fluid_admin/production/fluid-error.log \ -o /home/fluid_admin/production/fluid-out.log \ $(dirname $0)/www -- --max-memory-restart 120M --env=production
– Breen