Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions configuration/buffer-section.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,7 @@ Following are the configuration parameters for buffer plugin and its chunks:
* `total_limit_size` \[size\]
* Default: 512MB \(memory\) / 64GB \(file\)
* The size limitation of this buffer plugin instance
* Once the total size of stored buffer reaches this threshold, all append

operations will fail with error \(and data will be lost\)
* The limit applies to all chunks in the buffer together: staged chunks, queued chunks, and chunks being flushed. Once their total size reaches this threshold, the buffer does not accept new events, and what happens to them depends on `overflow_action`. The size is checked before each write to the buffer, so one write can take the total beyond this threshold.
* `queue_limit_length` \[integer\]
* Default: `nil`
* The queue length limitation of this buffer plugin instance
Expand Down Expand Up @@ -525,19 +523,21 @@ Following are the flushing parameters for chunks to optimize performance \(laten
operation has failed
* `overflow_action` \[enum: `throw_exception`/`block`/`drop_oldest_chunk`\]
* Default: `throw_exception`
* How does output plugin behave when its buffer queue is full?
* `throw_exception`: raises an exception to show the error in log
* How does output plugin behave when the total size of all chunks in the buffer reaches `total_limit_size`?
* `throw_exception`: raises `BufferOverflowError`, and the events are not written to the buffer.

If `<label @ERROR>` is configured, the events are routed to that label. Otherwise, the error reaches the input plugin that emitted the events, and whether they are lost depends on the input plugin. See [Output Plugins - overflow\_action](../output/README.md#overflowaction).
* `block`: wait until buffer can store more data.

After buffer is ready for storing more data, writing buffer is retried.
After buffer is ready for storing more data, writing buffer is retried, so the events are not rejected because of `total_limit_size`. If Fluentd is shut down while the buffer is still full, it stops waiting and raises `BufferOverflowError`.

Because of such behavior, `block` is suitable for processing batch execution,

so do not use for improving processing throughput or performance.

* `drop_oldest_chunk`: drops/purges the oldest chunk to accept newly
* `drop_oldest_chunk`: drops/purges the oldest chunk in the queue to accept the new events.

incoming chunk
Staged chunks and chunks being flushed are not dropped. After trying to drop a chunk, the output checks the limit again. If the total size is still at or above `total_limit_size`, for example because the queue was empty, the events are rejected in the same way as `throw_exception`. Otherwise, the write is retried. If the events are rejected, a dropped chunk is not put back in the queue.

### Retries Parameters

Expand Down
2 changes: 1 addition & 1 deletion output/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ If chunk flush takes longer time than this threshold, fluentd logs warning messa

#### `overflow_action`

Controls the buffer behavior when the queue becomes full.
Controls the buffer behavior when the total size of all chunks in the buffer reaches [`total_limit_size`](../configuration/buffer-section.md#buffering-parameters). The limit covers staged chunks and chunks being flushed as well as queued chunks, so it can be reached even when few or no chunks are queued.

Supported modes:

Expand Down