Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

the buffer for access log is too large #1567

Closed
spacewander opened this issue May 10, 2020 · 3 comments · Fixed by #1570
Closed

the buffer for access log is too large #1567

spacewander opened this issue May 10, 2020 · 3 comments · Fixed by #1570

Comments

@spacewander
Copy link
Member

Currently we configure the buffer of the access log like this:

    access_log {* http.access_log *} main buffer=32768 flush=3;

According to Nginx's doc:

The buffer size must not exceed the size of an atomic write to a disk file

http://nginx.org/en/docs/http/ngx_http_log_module.html

And for Linux, the default atomic write size is PIPE_BUF (4096), see man 7 pipe.

Therefore, the default size is too large to be safe.

@Miss-you
Copy link
Member

+1
A log buffer that is too small is not good, 4096 is more appropriate.

image

@Miss-you
Copy link
Member

On the other hand, is flush=1 better?
Since the log buffer is lowered, the flush time should also be lowered.

@Miss-you
Copy link
Member

#1570

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants