Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

pm2 is good for some things.


You shouldn’t use pm2 in software containers. That makes things more complex and not standard.


Can echo this. A colleague’s node container was maxing out CPU and just removing PM2 and running node directly solved the problem. That was easier than debugging why PM2 was having such a hard time.

To be fair, it was a straight up conversion of an old VM in vagrant and Docker was looked at as a one to one replacement before learning otherwise.


It gives you a bunch of stuff you don’t get running the script directly, and costs nothing, so why wouldn’t I opt for that?

They even have an explicit, “run in container” mode.


pm2 is great when running on servers, but using pm2 in containers feels wrong and again wasteful. Just invoke your script. If it crashes, fine Kubernetes or Docker handles that. Logs, handled by k8s. Monitoring I use DataDog.


What's the point of pm2? Every time I've seen it it's just been part of a messy misconfigured system and whatever it's actually doing could've been accomplished entirely with a tiny systemd unit running node directly.


From their site, I’m on mobile so the paste is a little rough.

BEHAVIOR CONFIGURATION

SOURCE MAP SUPPORT

CONTAINER INTEGRATION

WATCH & RELOAD

LOG MANAGEMENT

MONITORING

MODULE SYSTEM

MAX MEMORY RELOAD

CLUSTER MODE

HOT RELOAD

DEVELOPMENT WORKFLOW

STARTUP SCRIPTS

DEPLOYMENT WORKFLOW

PAAS COMPATIBLE

KEYMETRICS MONITORING

API




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: