Should PM2 God Daemon always be running?
Asked Answered
pm2
D

1

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?

Diatomaceous answered 29/12, 2015 at 23:32 Comment(0)
A
14

With pm2 you can kill the god daemon with

pm2 kill
Algometer answered 28/8, 2016 at 20:36 Comment(3)
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 stateDanella
@Danella 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?Rella
Depending on how the service is setup it will either restart or faultDanella

© 2022 - 2024 — McMap. All rights reserved.