From 43af06b1f0e78a8275a8ab167d79a4939194c836 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Fri, 24 Mar 2023 14:42:42 -0700 Subject: [PATCH] logging: non-blocking does not enqueue new messages when buffer is full See: https://github.com/moby/moby/issues/45200 Signed-off-by: Wesley Pettit --- config/containers/logging/configure.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/config/containers/logging/configure.md b/config/containers/logging/configure.md index b928f7dd8f..56b8bb5f97 100644 --- a/config/containers/logging/configure.md +++ b/config/containers/logging/configure.md @@ -135,8 +135,7 @@ Docker provides two modes for delivering messages from the container to the log driver: * (default) direct, blocking delivery from container to driver -* non-blocking delivery that stores log messages in an intermediate per-container - ring buffer for consumption by driver +* non-blocking delivery that stores log messages in an intermediate per-container buffer for consumption by driver The `non-blocking` message delivery mode prevents applications from blocking due to logging back pressure. Applications are likely to fail in unexpected ways when @@ -144,15 +143,14 @@ STDERR or STDOUT streams block. > **Warning** > -> When the buffer is full and a new message is enqueued, the oldest message in -> memory is dropped. Dropping messages is often preferred to blocking the +> When the buffer is full, new messages will not be enqueued. Dropping messages is often preferred to blocking the > log-writing process of an application. {: .warning} The `mode` log option controls whether to use the `blocking` (default) or `non-blocking` message delivery. -The `max-buffer-size` log option controls the size of the ring buffer used for +The `max-buffer-size` log option controls the size of the buffer used for intermediate message storage when `mode` is set to `non-blocking`. `max-buffer-size` defaults to 1 megabyte.