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

相關內容