微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

什么是pm2自动重启策略?

如何解决什么是pm2自动重启策略?

pm2 自动重启策略是什么?

我尝试用pm2启动Next.js应用,React渲染错误,pm2可以看到Error日志,但是不会重启。

我尝试使用 Pm2 来启动一个简单的 Koa 应用程序。处理网络请求的时候,触发了一个JS错误,Pm2可以看到Error日志,但是Pm2没有重启。

解决方法

Restart app at a specified CRON time
Restart app when files have changed
Restart when app reach a memory threshold
Delay a start and automatic restart
Disable auto restart (app are always restarted with PM2) when crashing or exiting by default)
Restart application automatically at a specific exponential increasing time

参考链接:https://pm2.keymetrics.io/docs/usage/restart-strategies/

希望这个链接对你有帮助

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。