Web如果想要你的应用,在超过使用内存上限后自动重启,那么可以加上--max-memory-restart参数。(有对应的配置项) pm2 start big-array.js --max-memory-restart 20M; 更新pm2. 官方文档. $ pm2 save # 记得保存进程状态 $ npm install pm2 -g $ pm2 update 复制代码 Web API WebApr 13, 2024 · max_restarts:设置应用程序异常退出重启的次数,默认15次(从0开始计数); autorestart :默认为true, 发生异常的情况下自动重启; cron_restart:定时启动,解 …
pm2 safe way to use max_memory_restart - Stack Overflow
WebAug 31, 2024 · PM2(Process Manager 2 )是具有内置负载均衡器的Node.js应用程序的生产运行时和进程管理器。 它允许您永久保持应用程序活跃,无需停机即可重新加载它们, … WebMax Memory Threshold Auto Reload PM2 allows to reload (auto fallback to restart if not in cluster) an application based on a memory limit/ Please note that the PM2 internal worker … clearing overgrown land
--max-memory-restart not working! · Issue #1159 · Unitech/pm2
http://www.120a6.cn/vps/33231.html WebPM2 允许根据内存限制重新加载(如果不在集群中,则自动回退重启)应用程序/请注意 PM2 内部工作程序(检查内存)每 30 秒启动一次,因此达到内存阈值后,可能需要稍等片刻 进程会自动重新启动。 使用 --max-memory-restart 选项指定内存阈值。 Web$ NODE_ENV = production pm2 restart web-interface --update-env. Stop. To stop a specified application: $ pm2 stop api $ pm2 stop [process_id] To stop them all: $ pm2 stop all ... You can monitor memory and CPU easily and straight from your terminal with: pm2 monit Showing application metadata. To display metadata about an application: clearing overgrown brush