How do I limit the number of auto-restarts on pm2? : <p>I have a node server running on pm2 which depends on some external services.</p>

<p>When those servers go down I pm2 starts restarting my app, but this will keep going until it clogs up my cpu and ram on the server, restarting as much as 50 times a minute.</p>

<p>Is there a way to limit the numbers of restarts on pm2? There is a way to restart the server when the server reaches a certain RAM memory level, so I would hope this feature I am asking for exists.</p>
