nginx 错误,不断重新打开日志

nginx 错误,不断重新打开日志

我希望任何人都可以帮助我或指导我正确的方向最近我搬到了一个新的主机并开始在我的 nginx 日志中看到这个

2015/09/24 11:12:01 [notice] 6697#0: signal 10 (SIGUSR1) received, reopening logs
2015/09/24 11:12:01 [info] 6697#0: epoll_wait() failed (4: Interrupted system call)
2015/09/24 11:12:01 [notice] 6697#0: reopening logs
2015/09/24 11:12:01 [notice] 6693#0: signal 10 (SIGUSR1) received, reopening logs
2015/09/24 11:12:01 [notice] 6693#0: reopening logs
2015/09/24 11:12:01 [notice] 6694#0: signal 10 (SIGUSR1) received, reopening logs
2015/09/24 11:12:01 [info] 6694#0: epoll_wait() failed (4: Interrupted system call)
2015/09/24 11:12:01 [notice] 6694#0: reopening logs
2015/09/24 11:12:01 [notice] 6695#0: signal 10 (SIGUSR1) received, reopening logs
2015/09/24 11:12:01 [info] 6695#0: epoll_wait() failed (4: Interrupted system call)
2015/09/24 11:12:01 [notice] 6695#0: reopening logs
2015/09/24 11:12:01 [notice] 6694#0: reopening logs
2015/09/24 11:12:01 [notice] 6695#0: reopening logs
2015/09/24 11:12:01 [notice] 6696#0: reopening logs
2015/09/24 11:12:01 [notice] 6697#0: reopening logs

在我的旧服务器上情况并非如此,新旧服务器具有相同的配置、相同的处理器和相同的硬盘。以下是 nginx 配置选项

#  /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.9.3
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) 
configure arguments: --with-http_stub_status_module 
--with-http_perl_module --with-http_flv_module 
--add-module=/usr/local/src/nginx_mod_h264_streaming-2.2.7 
--add-module=/usr/local/src/headers-more-nginx-module-0.261 
--with-debug

答案1

Nginx 使用 USR1 信号重新打开日志以进行日志轮换,请参阅:

https://www.nginx.com/resources/wiki/start/topics/tutorials/commandline/#Stopping-or-Restarting-Nginx

您应该检查您的 logrotate 设置,例如/etc/logrotate.d/nginx

相关内容