Skip to content
Discussion options

You must be logged in to vote

So my question is when the container's log lose

Generally speaking, system delays the actual file deletion until the last
open file handler is closed. The exact semantics varies depending on OS,
but it's (mostly) true on both Unix and Windows.

Here is what happens to Fluentd on file deletion:

  • Fluentd keeps open file handlers to log files that it monitors.

  • When Fluentd notices that some file was deleted, it thinks
    "hmm, the log file must be rotated by some other program".

  • Fluentd switches to a rotate mode, and keeps reading from the deleted
    file for 5 seconds.

  • Then close the file handler for the deleted file.

This generally works, and Fluentd can read up to the last line of
del…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@wangchaoforever
Comment options

@fujimotos
Comment options

@wangchaoforever
Comment options

Answer selected by fujimotos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants