Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nginx access_log default flush time

Tags:

nginx

How frequently nginx flushes its buffer to access_log by default ?

In manual there is not info, just setup syntax:

access_log path [format [buffer=size [flush=time]] [if=condition]];
like image 207
Dmitry Avatar asked Jun 10 '15 16:06

Dmitry


1 Answers

Nginx doesn't flush unless you specify the flush option (even if you have specified the buffer option).

Here's an example of how to buffer packets of 8k to the log every five minutes:

access_log  /var/log/nginx/access.log  main buffer=8k flush=5m;
like image 55
GreensterRox Avatar answered Sep 30 '22 13:09

GreensterRox