Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

It's nice and all, but I prefer the simplicity of forever for most of what I do.

@themarkymark I love pm2. I use it on my Spee.ch server and my onelovedtube server. Recently I started using the "cron_restart" command in pm2 for restarting my leaky apps once a day so they dont run out of memory. It was introduced into pm2 a few versions ago.

Great app, glad to see it's used by yourself as well.

pm2 is deceptively easy to use but has so many features you would never expect. A real shame there it is so expensive to use the paid version. For $80/months should be unlimited processes or a lot more than just 24.

@themarkymark oh.. I was wondering what you got with the paid version. My servers are quite light weight and I have a max of three or four pm2 processes running. But by the looks of your screenshots you may be close to that limit.

Yeah seems kinda crappy of them to do that, in the linux community.

Posted using Partiko Android

I don't mind a paid version, it's just expensive with a very small amount of processes you can run compared to unlimited with the free version.

One of the biggest things with the paid version is Machine Learning Error detection. In a production environment, this is huge.

You can see the differences here:

@themarkymark oh the machine learning part sounds interesting. I'll need to read up on that.

Posted using Partiko Android

A lot of Enterprise IT systems are integrating machine learning to analyze and detect failures. The ELK stack for log management has some really cool machine learning in the paid versions.

Great article compilation!

Posted using Partiko Android

Thanks for showcasing this, I never heard of it before! Bookmarking for later use :^)

I was using tmux. PM2 looks like this is a better solution for me since my scripts tend to fail a lot. I really like the auto-restart feature.

Just to clarify, does pm2 savework as an auto-restart when script stops working due to various errors?

pm2 save saves the current state of your scripts. You might have some scripts handled under pm2 but stopped and some running. It will keep track of that for you and upon reboot, they will be in the same state.

pm2 save has nothing to do with auto-restart, that will happen automatically after doing a pm2 start

I use tmux a lot as well for single processes. It's a shame it isn't as easy to log as screen but I like it far better.

cheers m8, thanks a lot for the commands.

👍
~Smartsteem Curation Team

Ahhhhh, I could call terminal commands from the code itself to use pm2. Nice idea, thanks. That solves the api issue.