Web如果想要你的应用,在超过使用内存上限后自动重启,那么可以加上--max-memory-restart参数。(有对应的配置项) pm2 start big-array.js --max-memory-restart 20M; 更新pm2. 官方文档. $ pm2 save # 记得保存进程状态 $ npm install pm2 -g $ pm2 update 复制代码 Web API Web# Set memory threshold for app reload pm2 start app.js -i max --max-memory-restart <200MB> Каждый раз при достижении лимита по памяти PM2 автоматически перезапустит процесс. Распределять память проще чем процессы, не так ли? 8 ...
PM2配置文件的使用 - 灰锅 - 博客园
http://www.codebaoku.com/tech/tech-yisu-780797.html WebSep 3, 2016 · 入门教程. 挑我们最爱的express应用来举例。. 一般我们都是通过 npm start 启动应用,其实就是调用 node ./bin/www 。. 那么,换成pm2就是. 注意,这里用了 --watch 参数,意味着当你的express应用代码发生变化时,pm2会帮你重启服务,多贴心。. 入门太简单了,没什么好讲 ... justin timberlake all the single ladies
PM2: подходим к вопросу процесс-менеджмента с умом / Хабр
WebRuns target script as . --hp . Defines home path when generating startup script. --wait-ip. Overrides systemd script to wait for full internet connectivity to launch pm2. --service-name . Defines service name when generating startup script. -c, --cron . Restarts a running process based on a cron pattern. WebPM2 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 (which checks memory), starts … WebApr 9, 2015 · pm2 start app.js --max-memory-restart 50M commander module will transform it to maxMemoryRestart: "50M", then after being processed by PM2 logic it will … laura healy ntu