# Flush log buffers on reload

**URL:** <https://www.ruby-forum.com/t/flush-log-buffers-on-reload/223420>\
**Category:** NGINX\
**Created:** [October 3, 2012, 1:47pm UTC](https://www.ruby-forum.com/t/flush-log-buffers-on-reload/223420 "2012-10-03T13:47:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [October 3, 2012, 1:47pm UTC](https://www.ruby-forum.com/t/flush-log-buffers-on-reload/223420/1 "2012-10-03T13:47:11Z")

</div>

Hi,

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?

Thanks,  
Markus

---

<div class="post-metadata">

**Author:** ![mflive](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@mflive](https://www.ruby-forum.com/u/mflive)\
**Post date:** [October 3, 2012, 2:37pm UTC](https://www.ruby-forum.com/t/flush-log-buffers-on-reload/223420/2 "2012-10-03T14:37:26Z")

</div>

Hello!

On Wed, Oct 03, 2012 at 11:50:17AM +0000, Markus J. 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 D.

> **[F5 NGINX: Built for cloud-native apps. Ready for AI traffic.](https://www.f5.com/products/nginx)**
>
> Deliver modern applications with NGINX. Explore high-performance load balancing, API gateways, and web server solutions trusted by top global enterprises.

---

<div class="post-metadata">

**Author:** ![mflive](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@mflive](https://www.ruby-forum.com/u/mflive)\
**Post date:** [October 3, 2012, 2:42pm UTC](https://www.ruby-forum.com/t/flush-log-buffers-on-reload/223420/3 "2012-10-03T14:42:42Z")

</div>

Thanks!

-----Original message-----
