Re: Safe log rotation

2014-10-02 Thread Igor Sysoev
On 03 Oct 2014, at 01:31, jmobile wrote: > Thanks Igor for pointing this out. > > If file is renamed, would it guarantee that nginx continues writing to it > without interruption? This is guaranteed by OS. -- Igor Sysoev Join us for nginx.conf 2014, October 20-22, San Francisco. Get 25% off

Re: Safe log rotation

2014-10-02 Thread jmobile
Thanks Igor for pointing this out. If file is renamed, would it guarantee that nginx continues writing to it without interruption? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,253681,253729#msg-253729 ___ nginx mailing list nginx@nginx.org

Re: Safe log rotation

2014-10-02 Thread Igor Sysoev
On 02 Oct 2014, at 11:08, oscaretu . wrote: > I think you should remove the line: > > sleep 15 > > It doesnt' anything useful, It just delay the restart, so during 15 seconds > the request will end been registered in the old log file Of course this sleep is not required, it is just to see t

Re: Safe log rotation

2014-10-02 Thread oscaretu .
I think you should remove the line: sleep 15 It doesnt' anything useful, It just delay the restart, so during 15 seconds the request will end been registered in the old log file mv /mnt/vg0-lv0/access.log /mnt/vg0-lv0/access.log.OLD sudo kill -USR1 `cat /var/run/nginx.pid` sleep 2 head -n 5 /mn

Re: Safe log rotation

2014-10-01 Thread Igor Sysoev
On 02 Oct 2014, at 01:30, jmobile wrote: > Hi, > > I'd like to check how nginx handles command from > http://wiki.nginx.org/LogRotation > kill -USR1 `cat /var/run/nginx.pid` > > I'm using it to recreate log files during rotation. > > My question if any loglines can be lost in case time interv

Safe log rotation

2014-10-01 Thread jmobile
Hi, I'd like to check how nginx handles command from http://wiki.nginx.org/LogRotation kill -USR1 `cat /var/run/nginx.pid` I'm using it to recreate log files during rotation. My question if any loglines can be lost in case time interval between physical log files rotation and USR1 is large enoug