How to kill and restart nodejs when the account has run out of processes.
Using username "shee".
Authenticating with public key "imported-openssh-key"
Passphrase for key "imported-openssh-key":
[shee@sg9 ~]$ ps
-bash: fork: Cannot allocate memory
[shee@sg9 ~]$ ls
-bash: fork: Cannot allocate memory
[shee@sg9 ~]$ free
-bash: fork: Cannot allocate memory
[shee@sg9 ~]$
I am running nodejs on fastcomet.com
cPanel Version 68.0 (build 37)
Apache Version 2.4.33
Operating System linux
Kernel Version 2.6.32-896.16.1.lve1.4.51.el6.x86_64
I am using pm2 to run nodejs
But as you can see above - every command gives the error "fork: Cannot allocate memory"
cPanel says: Number Of Processes 40 / 40 ( 100% )
Any ideas on how I can kill the process?