diff --git a/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb index b2fa734a1f..8bbac620bd 100644 --- a/lib/fluent/plugin/in_tail.rb +++ b/lib/fluent/plugin/in_tail.rb @@ -732,7 +732,7 @@ def handle_notify if !io.nil? && @lines.empty? begin while true - @fifo << io.readpartial(2048, @iobuf) + @fifo << io.readpartial(8192, @iobuf) while (line = @fifo.next_line) @lines << line end diff --git a/test/plugin/test_in_tail.rb b/test/plugin/test_in_tail.rb index f1ddc4606d..c37bc2092e 100644 --- a/test/plugin/test_in_tail.rb +++ b/test/plugin/test_in_tail.rb @@ -196,7 +196,7 @@ def test_emit_with_read_lines_limit(data) config = CONFIG_READ_FROM_HEAD + config_element("", "", { "read_lines_limit" => limit }) + PARSE_SINGLE_LINE_CONFIG end d = create_driver(config) - msg = 'test' * 500 # in_tail reads 2048 bytes at once. + msg = 'test' * 2000 # in_tail reads 8192 bytes at once. d.run(expect_emits: 1) do File.open("#{TMP_DIR}/tail.txt", "ab") {|f|