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?