Welcome! Log In Create A New Profile

Advanced

Re: Empty error and access log

Maxim Dounin
September 26, 2019 11:10AM
Hello!

On Thu, Sep 26, 2019 at 09:13:20AM -0400, rick_pri wrote:

> We recently noticed this on our servers and we were using USR1 for
> postrotation which wasn't working as expected. We changed the post rotation
> command to be HUP and this fixed the issues of rotation being borked.
>
> http://nginx.org/en/docs/control.html
> It says that USR1 should reopen logfiles after they have been renamed but we
> found that this didn't work

The USR1 is the right way to ask nginx to reopen log files, and it
is enough for log rotation. While using HUP is also possible, it
does full configuration reload, and using it for log rotation is
wrong - for example, this may result in accidental use of a
configuration being edited.

If USR1 does not work for you, most likely it is because log files
after log rotation cannot be opened for writing by worker
processes. Fix is to assing correct access rights to the new
files created during log rotation, and also make sure nginx worker
process are able to access the directory with the log files.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Empty error and access log

krishna September 26, 2019 06:22AM

Re: Empty error and access log

krishna September 26, 2019 06:24AM

Re: Empty error and access log

Francis Daly September 26, 2019 07:10AM

Re: Empty error and access log

krishna September 26, 2019 07:25AM

Re: Empty error and access log

rick_pri September 26, 2019 09:13AM

Re: Empty error and access log

Francis Daly September 26, 2019 11:00AM

Re: Empty error and access log

Maxim Dounin September 26, 2019 11:10AM

Re: Empty error and access log

Maxim Dounin September 26, 2019 11:14AM

Re: Empty error and access log

krishna September 27, 2019 01:36AM

Re: Empty error and access log

Francis Daly September 27, 2019 01:58AM

Re: Empty error and access log

Francis Daly September 27, 2019 03:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready