有台生产服务器, Nginx 每天都会因为不同原因 exit 一次,虽然配了自动重启,有没办法排查是什么原因?平均一天 1820 万请求

1次阅读

共计 568 个字符,预计需要花费 2 分钟才能阅读完成。

每天原因都不一样,这是今天的日志

Aug 15 13:07:32 hostname nginx[3297853]: nginx: [emerg] host not found in upstream "backend.example.com" in /etc/nginx/sites-enabled/app1:25
Aug 15 13:07:32 hostname nginx[3297853]: nginx: configuration file /etc/nginx/nginx.conf test failed
Aug 15 13:07:32 hostname systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Aug 15 13:07:32 hostname systemd[1]: nginx.service: Failed with result 'exit-code'.
Aug 15 13:07:32 hostname systemd[1]: Failed to start A high performance web server and a reverse proxy server.

在这几秒前崩了没写日志,这个日志是刚自动重启后又崩了的。没改配置,10 秒后第三次自动重启就成功了。backend 在别的服务器上,内网 DNS 也一直正常

正文完
 0