经过几周的正常运行后,Nginx Node崩溃了

loading...


0

每隔几周,我的服务器设置崩溃 - 每当我尝试连接到服务器时,我的浏览器都会显示ERR_CONNECTION_REFUSED .

当我进入服务器时,应用程序的内存使用似乎很好,仅使用140MB . pm2表示该应用程序在线,其错误日志是干净的 . So the node app is fine.

sudo nginx status 表示该服务已崩溃 .

● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sun 2018-12-09 12:19:13 UTC; 22h ago
  Process: 9746 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=1/FAILURE)
 Main PID: 18612 (code=exited, status=0/SUCCESS)

Nginx访问日志表示在崩溃时未访问服务器 .

Nginx错误日志显示了很多这样的:

2018/12/09 12:19:20 [emerg] 9758#9758: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/09 12:19:20 [emerg] 9758#9758: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/09 12:19:20 [emerg] 9758#9758: still could not bind()
2018/12/10 00:28:13 [notice] 774#774: signal process started
2018/12/10 00:28:13 [error] 774#774: invalid PID number "" in "/run/nginx.pid"
2018/12/10 00:28:19 [notice] 776#776: signal process started
2018/12/10 00:28:19 [error] 776#776: invalid PID number "" in "/run/nginx.pid"

当我运行 sudo service nginx restart 时,一切都恢复正常 .

这种情况每隔几周发生一次,我无法弄清楚可能是什么原因 . 有没有人对此有任何提示?

loading...

0回答

No Data

评论

暂时没有评论!