Is NodeBB compatible with PM2?
-
https://github.com/Unitech/pm2
Will be using this instead of forever. Suggestions?
-
NodeBB has been shown to work fine with pm2. However, I do not use it for the following reasons:
- pm2 launches a "Satan" daemon that does not get killed, ever. This daemon hogs ports, so if you use
stop
orstopAll
, congratulations, your previous NodeBB ports are now blocked forever. - Unitech's suggestion is to use Node 0.11.x. Are you serious? The latest stable build is still 0.10.
- pm2 has no "programmatic" interface so I can use it as a module inside of a script. Forever has forever-monitor, and even though it's pretty buggy (outfiles and logs don't even work), at least I have that instead of... nothing.
- In my (albeit limited) testing, I found that
pm2 restart
acted more like a soft restart. All modules were still loaded, meaning in development, old data was still being served.
In short, I have to jump through hoops to
kill -9
the satan instance in order to free a port. That's enough of a turn-off for me, but lots of people like it.Edit: Can you tell I don't like pm2?
Edit 2: It is worth mentioning that I haven't tried pm2 in nearly a month. It may work better now.
- pm2 launches a "Satan" daemon that does not get killed, ever. This daemon hogs ports, so if you use
-
Suggestion to use
pm2 kill
to stop instancesI understand that it is difficult when the underlying software (Node.js) breaks a crucial part of your program, and there is no obvious solution, so it isn't really the fault of the developers. I just simply won't use pm2 until Node v0.11 hits the shelves.
I really tried to like pm2...!
-
I can say that when I used it about 2 months ago I know what you're talking about when you have to jump through a bunch of b.s. to kill a process that won't die.
I believe pm2 has gotten a bit better as I've been watching their progress closely which is why I've been hesitant on using it.
@julian thanks for the information! Now you're making me not want to use it until node 0.11
-
currently using pm2 (8 processes on an 8 core server) works but only for non socket calls. Chat messages don't appear and the connection shows to constantly be lost and re established (from the browser) very rapidly.
Any help on this?
-