You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: buffer/README.md
+31-1Lines changed: 31 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,37 @@ Fluentd will abort the attempt to transfer the failing chunks on the following c
77
77
78
78
\(default: `72h`\)
79
79
80
-
In these events, **all chunks in the queue are discarded.** If you want to avoid this, you can enable `retry_forever` to make Fluentd retry indefinitely.
80
+
Before v1.19.0 (fluent-package v6), **all chunks in the queue are discarded** in these events.
81
+
If you want to avoid this, you can enable `retry_forever` to make Fluentd retry indefinitely or enable `secondary` output.
82
+
83
+
Since v1.19.0 (fluent-package v6), the file buffer plugins ([`buf_file`](file.md) and [`buf_file_single`](file_single.md)) provides a safer and more user-friendly feature.
84
+
They evacuates the chunk files in the queue to the following directory before clearing the queue.
85
+
86
+
```text
87
+
${root_dir}/buffer/${plugin_id}/
88
+
```
89
+
90
+
`${root_dir}` is determined by the parameter `root_dir` in `<system>`.
91
+
If you do not configure this parameter, it will be `/tmp/fluent/`.
92
+
93
+
After the issues, such as network failures, are resolved, you can recover these chunks by moving the evacuated chunk files back to the plugin's buffer directory and restarting Fluentd.
94
+
95
+
{% hint style='info' %}
96
+
If the plugin runs with multi-worker, the original buffer directory should be separated per worker. The evacuated chunk files can be restored to any worker's directory.
97
+
{% endhint %}
98
+
99
+
{% hint style='info' %}
100
+
You can use [zero-downtime restart](../deployment/zero-downtime-restart.md) to prevent downtime of some input plugins like `in_tcp`.
101
+
{% endhint %}
102
+
103
+
{% hint style='info' %}
104
+
For third-party buffer plugins, it is necessary to implement a function to support this feature.
105
+
Please see [How to Write Buffer Plugin](../plugin-development/api-plugin-buffer.md) for details.
106
+
{% endhint %}
107
+
108
+
{% hint style='warning' %}
109
+
Please note that [`buf_memory`](memory.md) does not support this feature.
log.warn"chunk files are evacuated to #{backup_dir}.", chunk_id: dump_unique_id_hex(chunk.unique_id)
23
+
rescue => e
24
+
log.error "unexpected error while evacuating chunk files.", error: e
25
+
end
26
+
```
27
+
5
28
If this article is incorrect or outdated, or omits critical information, please [let us know](https://github.com/fluent/fluentd-docs-gitbook/issues?state=open). [Fluentd](http://www.fluentd.org/) is an open-source project under [Cloud Native Computing Foundation \(CNCF\)](https://cncf.io/). All components are available under the Apache 2 License.
0 commit comments