Socket.io的Node.js挂起,不monit的重新启动过程(Socket.io node.j

2019-10-18 10:30发布

我有一个的node.js服务器(与socket.io)使用暴发户和monit的运行。 我的问题是我的服务器不可访问(通常当IM离线发生),和monit的是无法重新启动该进程。 服务器只重新激活,或者如果我使用FileZilla的登录到FTP惊醒。

这是我的monit的配置:

set logfile /var/log/monit.log
check process mynode with pidfile /home/mylocation/pid/node-app.pid
start program = "/etc/init.d/node-app start" uid nobody and gid nobody
stop program  = "/etc/init.d/node-app stop"
if failed port 8000 protocol HTTP
    request /
    with timeout 10 seconds
    then restart

有任何想法吗?

Answer 1:

我能解决我的问题,。 它的服务器软件版本。 如果有人仍然撞上了这个问题,只是升级到最新的稳定版本的软件。 煤矿在Ubuntu 12.04工作正常



文章来源: Socket.io node.js hangs and monit not restarting the process