Flush log buffers on reload

Maxim Dounin mdounin at mdounin.ru
Wed Oct 3 12:37:01 UTC 2012


On Wed, Oct 03, 2012 at 11:50:17AM +0000, Markus Jelsma wrote:

> It seems that Nginx does not flush the log buffers to disk on 
> reload but it would be really helpful if it could. Is there any 
> trick to flush the buffers to disk on reload?

Log buffers are flushed by a shutting down nginx worker process 
once there are no more requests in progress and it's going to 
exit.  If it's not enough in your use case, you may use logrotate 
signal (USR1) flush log buffers at any time you want.

Maxim Dounin

More information about the nginx mailing list