开始总是找不到原因,是因为在启动服务时,没有设置日志文件。突然想到了是不是forever安装的有问题,就重新安装forever ,
这时候提示系统 no space left on device , 采用df - h 查看磁盘占用情况。
1发现是磁盘占用率达到了100%,导致用forever 启动服务时,不能创建文件了,启动服务失败,所以服务访问一次后第二次就不能访问了
2将磁盘不需要的大文件删除
a. 采用命令 find / -size +100M -exec ls -lh {} ; 查找出文件大笑大于100M的
b . 采用rm -rf 删除大文件
c. 采用 lsof | grep deleted 查看被删除文件 , kill -9 进程id
d. df -h 查看磁盘占用情况
3 采用 forever start -a -l forever.log -o out.log -e err.log ./bin/www 启动服务
4 查看是否在守护进程当中 forever list
5 服务可以正常访问