pm2 crash with too many unstable restarts (16). Stopped. "errored" in python
I had the same issue and resolved with:
pm2 kill
rm -rf node_modules
npm i
pm2 start index.js
sudo shutdown -r now
I have created a script that can run the python django application. I run this script using pm2.
I do pm2 start scripts.sh, it works properly but after some time my application doesn't work and displays an error like this

the runtime process for the instance running on port 37001 has unexpectedly quit**

I show the log using pm2 logs, it displays an error like this

script.sh had too many unstable restarts (16). Stopped. "errored"

How to resolved it? Can anyone help me?