3 ms·
Tangentially: Writing this at 1:30am, might not be very insightful. We actually are phasing out the use of pm2 in our org since we are already running within
by SSchick 2y ago
Tangentially:
Writing this at 1:30am, might not be very insightful.
We actually are phasing out the use of pm2 in our org since we are already running within kubernetes. And running pm2 within k8s seemed redundant (and is likely a relict of previous deployment strategies).
It also made certain debugging tasks trickier as we very rarely like to attach debuggers to our staging environment and the cluster/fork behavior of pm2 made it hard to effectively target indivual executions/processes.
Further we had some issues running nextjs after upgrading to the latest version within pm2 when using custom configuration files (we did not end up finding the root cause but decided to drop pm2, least path of resistance etc).
One other thing that also gave us headaches was the fact that pm2 allows specifying different env variable values for different environments but no other configuration (such as cluster count etc.)
We were successful entirely replacing it with docker-compose configs locally that are ultimately closer to how our services are deployed in production.
Overall I think pm2 is suitable for local dev and prototyping small to medium complexity services.
- ilaksh 2y agoIt seems strange that you would even consider using pm2 still if you have all of that other stuff. I use it to avoid the complexity of those things since my operational needs are usually very modest.
- hosh 2y agoAt work, we have kubernetes and pm2 running on a pet server outside of kubernetes. I cannot wait to get rid of pm2 and the pet server. For smaller projects, I'd rather just work directly with systemd or better yet, use the podman-systemd integrations.