我试图在我的ubuntu服务器上运行幽灵node.js应用程序。由于我主要是在对linux系统进行实验,我尝试了很多事情,最后设法让鬼在服务器上运行,使用永久包和下面的upstart脚本重新启动。
description "node.js ghost aps"
start on started
stop on shutdown
script
export PATH="/home/deploy/local/bin:$PATH"
export NODE_ENV=production
cd "/home/deploy/web-apps/ghost/"
exec forever start "/home/deploy/web-apps/ghost/index.js" -e "/home/deploy/web-apps/ghost/error.log"
end script但是过了一段时间,我注意到运行脚本的数量每天都在增加,最终导致内存不足。
info: Forever processes running
data: uid command script forever pid logfile uptime
data: [0] unyu /home/deploy/local/bin/node /home/deploy/web-apps/ghost/index.js -e /home/deploy/web-apps/ghost/error.log 530 752 /root/.forever/unyu.log 2:22:4:30.155
data: [1] 73wG /home/deploy/local/bin/node /home/deploy/web-apps/ghost/index.js -e /home/deploy/web-apps/ghost/error.log 2563 2573 /root/.forever/73wG.log 0:23:31:55.579我应该如何和在哪里检查这些脚本是什么启动的?
发布于 2013-12-19 07:33:29
我通过将start on started改为start on startup解决了这个问题
https://askubuntu.com/questions/388164
复制相似问题