I am using pm2 to manage my node.js processes. Very happy with it so far.
What is the purpose of $ pm2 save
? What is the purpose of saving a process list? I don't quite understand from the documentation. https://github.com/Unitech/pm2
Saving all running PM2 processesMake sure you have all the PM2 processes running you want on startup. This will create a dump. pm2 , which will auto startup our scripts. Now, whenever your server reboots, your processes will automatically restart as well 🤗.
PM2 is an advanced process manager for NodeJS applications that allows you quickly start, control, or stop your node processes. It runs as a daemon on the server and will make sure your app is available 24/7/365! Of course, we at HostArmada want to offer our clients the best tools to manage their NodeJS applications.
PM2 is an acronym of Process Management Module which is used to run and manage Node. js applications. It's an open-source with an in-built load balancer. When a process goes down, PM2 will automatically restart the service and make it Live. PM2 works on Linux, Windows, and macOS.
pm2 save
takes a snapshot of your currently running Node applications. You can then restore these applications using pm2 resurrect
.
This is useful because it means you don't have to manually restart each application when you restart pm2 (such as a machine reboot). Instead, you can just have a script that calls pm2 resurrect
and it'll start up all the Node apps.
pm2 resurrect
is useful to be called manually. If you want your processes to automatically start on boot, you should create a startup script with pm2 startup
.
$ pm2 save
is used to save the pm2 process list to relaunch them after a server reboot. It comes generaly with :
pm2 startup
which generates Startup Script
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With