View this post on Hive: How to use PM2 to manage your scripts
How to use PM2 to manage your scripts
5 years ago by themarkymark (78)
$34.59
- Past Payouts $34.59
- - Author $18.97
- - Curators $15.63
308 votes
- + buildawhale: $8.306 (39.47%)
- + themarkymark: $6.944 (100%)
- + smartsteem: $5.813 (15%)
- + upmyvote: $2.069 (71.82%)
- + yabapmatt: $1.708 (100%)
- + jphamer1: $1.276 (100%)
- + steemflagrewards: $1.062 (74.62%)
- + memehub: $1.004 (100%)
- + bue: $0.716 (100%)
- + slobberchops: $0.569 (100%)
- + ripperone: $0.567 (26%)
- + epicdice: $0.546 (100%)
- + msp-waves: $0.467 (100%)
- + asgarth: $0.434 (100%)
- + steemyoda: $0.416 (3.75%)
- + upboater: $0.395 (100%)
- + solominer: $0.232 (100%)
- + roomservice: $0.149 (100%)
- + ipromote: $0.142 (100%)
- + abbak7: $0.113 (100%)
- … and 288 more
It's nice and all, but I prefer the simplicity of forever for most of what I do.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@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.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
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.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@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
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
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:
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@themarkymark oh the machine learning part sounds interesting. I'll need to read up on that.
Posted using Partiko Android
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
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.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Great article compilation!
Posted using Partiko Android
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks for showcasing this, I never heard of it before! Bookmarking for later use :^)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
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 save
work as an auto-restart when script stops working due to various errors?Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
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 apm2 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.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
cheers m8, thanks a lot for the commands.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
👍
~Smartsteem Curation Team
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Ahhhhh, I could call terminal commands from the code itself to use pm2. Nice idea, thanks. That solves the api issue.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit