Re: Quick question about using kill -USR1 to recreate access.log

2017-09-28 Thread Maxim Dounin
Hello! On Wed, Sep 27, 2017 at 01:17:35PM -0700, Alder Netw wrote: > We came across a case where kill -USR1 doesn't cause nginx reopen the > access.log. And we need to run nginx with "daemon off" and "master-process > off". Is that a known issue and is there any workaround? Works fine here, just

Re: Quick question about using kill -USR1 to recreate access.log

2017-09-27 Thread Alder Netw
Hi Maxim, We came across a case where kill -USR1 doesn't cause nginx reopen the access.log. And we need to run nginx with "daemon off" and "master-process off". Is that a known issue and is there any workaround? On Tue, May 20, 2014 at 4:33 AM, Maxim Dounin wrote: > Hello! > > On Mon, May 19, 2

Re: Quick question about using kill -USR1 to recreate access.log

2014-05-20 Thread Maxim Dounin
Hello! On Mon, May 19, 2014 at 03:06:06PM -0400, samingrassia wrote: > Thanks to everyone in advance! > > I have a cron that runs the following: > > mv $NGINX_ACCESS_LOG $ACCESS_LOG_DROPBOX/$LOG_FILENAME > kill -USR1 `cat $NGINX_PID` > > My questions is during time between the mv and the kill,

Re: Quick question about using kill -USR1 to recreate access.log

2014-05-20 Thread B.R.
On Tue, May 20, 2014 at 9:37 AM, Valentin V. Bartenev wrote: > Deleting a file doesn't make file descriptor "invalid". It's valid and the > file actually exists on file system till there is at least one descriptor > pointing to that file. > ​Thanks for that Valentin, I learned something today.

Re: Quick question about using kill -USR1 to recreate access.log

2014-05-20 Thread Valentin V. Bartenev
On Tuesday 20 May 2014 09:52:09 Lasse Laursen wrote: > Alternatively have a look here: > http://www.cambus.net/log-rotation-directly-within-nginx-configuration-file > / > [..] This is a bad way to solve the problem. 1. It introduces two additional open()/close() system calls per access_log

Re: Quick question about using kill -USR1 to recreate access.log

2014-05-20 Thread Lasse Laursen
Alternatively have a look here: http://www.cambus.net/log-rotation-directly-within-nginx-configuration-file/ Kind regards Lasse Laursen > On 19 May 2014, at 21:06, "samingrassia" wrote: > > Thanks to everyone in advance! > > I have a cron that runs the following: > > mv $NGINX_ACCESS_LOG $AC

Re: Quick question about using kill -USR1 to recreate access.log

2014-05-20 Thread Valentin V. Bartenev
On Tuesday 20 May 2014 09:01:45 B.R. wrote: > On Mon, May 19, 2014 at 9:53 PM, Lord Nynex wrote: > > The name of the file is really sort of irrelevant. The file descriptor > > will still point at $ACCESS_LOG_DROPBOX/$LOG_FILENAME. Any log lines > > between MV and KILL *should* still be written the

Re: Quick question about using kill -USR1 to recreate access.log

2014-05-20 Thread B.R.
On Mon, May 19, 2014 at 9:53 PM, Lord Nynex wrote: > > The name of the file is really sort of irrelevant. The file descriptor > will still point at $ACCESS_LOG_DROPBOX/$LOG_FILENAME. Any log lines > between MV and KILL *should* still be written there. > > Why not use logrotate? > ​Th​ere has bee

Re: Quick question about using kill -USR1 to recreate access.log

2014-05-19 Thread Lord Nynex
The name of the file is really sort of irrelevant. The file descriptor will still point at $ACCESS_LOG_DROPBOX/$LOG_FILENAME. Any log lines between MV and KILL *should* still be written there. Why not use logrotate? Why not use nginx reload? Why not use HUP? On Mon, May 19, 2014 at 12:36 PM, Fra

Re: Quick question about using kill -USR1 to recreate access.log

2014-05-19 Thread Francis Daly
On Mon, May 19, 2014 at 03:06:06PM -0400, samingrassia wrote: Hi there, > mv $NGINX_ACCESS_LOG $ACCESS_LOG_DROPBOX/$LOG_FILENAME > kill -USR1 `cat $NGINX_PID` > > My questions is during time between the mv and the kill, is there any log > writes that are being discarded or are they being stacked

Quick question about using kill -USR1 to recreate access.log

2014-05-19 Thread samingrassia
Thanks to everyone in advance! I have a cron that runs the following: mv $NGINX_ACCESS_LOG $ACCESS_LOG_DROPBOX/$LOG_FILENAME kill -USR1 `cat $NGINX_PID` My questions is during time between the mv and the kill, is there any log writes that are being discarded or are they being stacked in memory a