Valentin V. Bartenev
June 27, 2019 02:20PM
On Thursday 27 June 2019 19:44:22 Peter Bittner wrote:
> I may be a bit ignorant about system-level operations, I apologize.
>
> Can you explain why this works better with writing to a file (i.e. the
> hardcoded location /var/log/nginx/*.log)?
>
[..]

In most cases writing to a file never blocks.

Writing to stdout/stderr blocks as soon as buffers in kernel are getting full.
This may happen when consumer is slower than producer, or if the consumer is
just got stuck and don't read.

You can see users experience this issue:
https://github.com/docker/compose/issues/6018

So, nginx (like any other async application) must either log to a regular file
or an UDP socket. Anything else is a bad idea from performance and reliability
points of view.

wbr, Valentin V. Bartenev

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Default log file locations

Peter Bittner 316 June 27, 2019 01:14PM

Re: Default log file locations

Valentin V. Bartenev 149 June 27, 2019 01:36PM

Re: Default log file locations

Peter Bittner 145 June 27, 2019 01:46PM

Re: Default log file locations

Valentin V. Bartenev 133 June 27, 2019 02:20PM

Re: Default log file locations

Sergey Brester 165 June 27, 2019 02:48PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 209
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready