Welcome! Log In Create A New Profile

Advanced

Re: Empty error and access log

Francis Daly
September 26, 2019 11:00AM
On Thu, Sep 26, 2019 at 07:25:45AM -0400, krishna wrote:

Hi there,

> logrotate has been used to archive the nginx log files on daily basis from
> the machine and below is the configuration.

> postrotate
> /usr/bin/kill -USR1 `cat /var/pid/nginx.pid 2>/dev/null` 2>/dev/null ||
> true #PID file for nginx
> endscript

That looks like it should work; although the "2>/dev/null" parts will
possibly throw away any useful status message.

http://nginx.org/en/docs/control.html describes what should happen,
on the nginx side.

When I test here, I don't see anything obvious in the error_log that
indicates that USR1 was received.

So from here, it looks to me that if you can describe a repeatable recipe
that causes this unwanted behaviour to happen, then there may be something
within nginx that needs fixing.

(If I do a straightforward

mv logs/access.log logs/access.log.$(date +%s)

then my next request is written to the moved file; and after

kill -USR1 `cat logs/nginx.pid`

then the next request is written to the new access.log.

So a "simple" test here does not fail.)

Cheers,

f
--
Francis Daly francis@daoine.org
_______________________________________________
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: 319
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready