logstash-plugins / logstash-input-file

Apache License 2.0
68 stars 101 forks source link

Read mode is not immediately stop consuming lines when shutting down is requested #323

Closed edmocosta closed 9 months ago

edmocosta commented 9 months ago

Logstash is unable to shut down (in a reasonable amount of time) when the input file plugin is in read mode and the files being read have thousands of lines. The plugin only checks the exit condition (to stop reading) after processing all the current file lines (buffered), which might take too long if the pipeline has a slow sink. Changing it to immediately stop consuming lines would improve the shutdown performance and avoid Logstash to being killed by service managers such as systemd.