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.
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.