I made a gRPC client in node and i start it through pm2 with a simple:
pm2 start --name myAppName
The gRPC client have some listener on.data, on.error on.end etc
All works well but sometimes the gRPC server trigger the on.end with an error and then the script stop.
Error: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)
I was expecting that by default pm2 job was to restart in that case but it seem not.
Do i needs to explicitely use a restart strategy like "--exp-backoff-restart-delay=100" when i start the app with pm2 for it to restart automatically in that situation? --watch option is not related here right? its only for file change restart is that correct?
Thanks in advance for the help.
question from:
https://stackoverflow.com/questions/65869252/can-pm2-automatically-restart-a-script-that-end 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…