Socket.io node.js hangs and monit not restarting t

2019-08-06 04:21发布

I have a node.js server (with socket.io) running using upstart and monit. My problem is my server becomes inaccessible (usually happens when im offline), and the monit is unable to restart the process. The server only reactivates or awakened if i login into the ftp using filezilla.

This is my monit configuration:

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

Any ideas?

1条回答
三岁会撩人
2楼-- · 2019-08-06 04:45

I was able to solve my issue,. it was server software versions. If anyone still bumped into this problem, just upgrade to latest stable software versions. Mine works fine in ubuntu 12.04

查看更多
登录 后发表回答