Nginx does not re-open log files on SIGUSR1.

Piotr Sikora piotr.sikora at frickle.com
Mon Jan 3 15:18:51 MSK 2011


Hi,

> pkill send USR1 signal to all nginx processes,
> not only master, but also all worker processes
> in random order - it may be first workers, and last master.

$ curl localhost >/dev/null 2>&1
$ ls -l /var/log/nginx/
total 8
-rw-r--r--  1 root  wheel   167 Jan  3 12:09 access.log
-rw-r--r--  1 root  wheel  1202 Jan  3 12:12 error.log

$ sudo pkill -USR1 -f ^nginx:.*master.*process

$ curl localhost >/dev/null 2>&1
$ ls -l /var/log/nginx/
total 12
-rw-r--r--  1 _nginx  wheel   334 Jan  3 12:13 access.log
-rw-r--r--  1 _nginx  wheel  2738 Jan  3 12:13 error.log

Happy? Result is exactly the same...

> if worker processes does not have write permissions
> to /var/log/nginx directory - worker processes can`t
> create new log files, and can't write to log files.

Worker process doesn't create log files, master process does.

Other than complaining about non-existing issue, you didn't answer any of my 
questions...

Best regards,
Piotr Sikora < piotr.sikora at frickle.com >




More information about the nginx mailing list