Skip to content

Commit a22fd3a

Browse files
committed
multiline: Add a description for the buffer limit of multiline
This is corresponding to fluent/fluent-bit#10653. Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 9d2c7bf commit a22fd3a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

administration/configuring-fluent-bit/multiline-parsing.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,23 @@ The multiline parser is a very powerful feature, but it has some limitations tha
255255
- The multiline parser isn't affected by the `buffer_max_size` configuration option, allowing the composed log record to grow beyond this size. The `skip_long_lines` option won't be applied to multiline messages.
256256
- It's not possible to get the time key from the body of the multiline message. However, it can be extracted and set as a new key by using a filter.
257257

258+
### Additional configuration for Buffer Limit Of Multiline
259+
260+
Fluent Bit now supports a configuration key to **limit the memory used during multiline concatenation**.
261+
262+
| Property | Description | Default |
263+
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
264+
| `multiline_buffer_limit` | Sets the maximum size of the in-memory buffer used while assembling a multiline message. When the accumulated size exceeds this limit, the message is truncated and a `multiline_truncated: true` metadata field is attached to the emitted record. A value of `0` disables the limit. Accepts unit suffixes like `KiB`, `MiB`, or `GiB`. | `2MiB` |
265+
266+
```text
267+
service:
268+
multiline_buffer_limit 2MiB # default; limit concatenated multiline message size
269+
```
270+
271+
If the limit is reached, Fluent Bit flushes the partial record with `multiline_truncated: true` metadata immediately to prevent Out-Of-Memory (OOM) conditions.
272+
This option ensures predictable memory usage in Kubernetes or other constrained environments,
273+
particularly when using built-in parsers such as `cri` or `docker`.
274+
258275
## Get structured data from multiline message
259276

260277
Fluent-bit supports the `/pat/m` option. It allows `.` matches a new line, which can be used to parse multiline logs.

0 commit comments

Comments
 (0)