Socket.io node.js hangs and monit not restarting the process

老子叫甜甜 提交于 2020-01-15 12:44:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!