问题
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:
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
来源:https://stackoverflow.com/questions/17926464/socket-io-node-js-hangs-and-monit-not-restarting-the-process