11

I use pm2 to deal with node projects. Even when all projects are stopped via pm2, I see that pm2 God Daemon is always running and consuming about ~27M Ram. Here how it looks on ps aux: nodeuser 2577 ? Ssl 18:02 0:01 PM2 v0.15.10: God Daemon

The question is, is it built to be that way? Should pm2 God Daemon always be running? However if it is the case, I would like to know why because it didn't make sense to me.

Can I kill pm2 God Daemon via pm2? Or simply kill with kill -9 pid?

fcukinyahoo
  • 313
  • 1
  • 5
  • 16

1 Answers1

14

With pm2 you can kill the god daemon with

pm2 kill
Pyry Liukas
  • 431
  • 6
  • 10
  • 2
    Thats bad, as it nukes you config as well. Not ideal if you want to restart the god daemon under systemd rather that stand alone but in its existing state – krad Apr 24 '18 at 14:43
  • @krad pm2 will utilize saved config and will resurrect daemonized processes if `pm2 save` and `pm2 startup` have been used. How will `pm2 kill` impact systemd in such case? – CᴴᴀZ Nov 25 '19 at 08:23
  • Depending on how the service is setup it will either restart or fault – krad Jan 03 '20 at 11:58