2

I've seen some similar issues, but none seem to address this exact problem I'm having. I use the Nginx pid file when running an awstats update + log rotation so that I can tell the process to close and reopen the log files. This is the standard way I've seen of doing this: kill -USR1 cat /usr/local/nginx/logs/nginx.pid (http://wiki.nginx.org/LogRotation)

However, my issue is that sometimes the pid file disappears. When this happens, the log rotation doesn't properly reopen files and nginx continues to write to the same log files. I have no idea why this happens, and I usually have to do a full nginx stop + nginx start to get it to recreate the pid file. It also doesn't happen on a regular schedule. Sometimes the webserver will be fine for months and then all of a sudden the PID file will disappear and then the logs won't get updated properly. Is this something that anyone else has encountered? Any ideas to try?

Nginx version: 1.5.13 OS: CentOS 6.5

Ghan
  • 21
  • 2

0 Answers0