Logstash automatic config reload and config.reload.interval (high CPU usage)

Hi,

I've upgraded my logstash deployments multiple times over the years (starting way back in the 1.x days), and I had set Logstash to check once a minute for config changes (auto-reload) in the logstash.yml file.

I recently noticed that some of my logstash (v8.12) systems were using a full CPU core's worth of processing while they were doing nothing. Digging into the issue, I discovered that they were constantly (multiple times a second) checking for new configs.

After searching online a while, I see that the semantics of config.reload.interval have subtly changed: now the interval is required to have an "s" after the number to indicate seconds. My config just had the bare number.

From the 8.12 Logstash documentation https://www.elastic.co/guide/en/logstash/current/reloading-config.html, it implies that the "s" unit qualifier is required. Shouldn't Logstash configs lacking this qualifier either output a warning message or error out entirely (that's what is implied by the documentation at the link)?

Thanks,

- Daniel

No, the time qualifier is required since version 6.X, if you do not specify it is treated as a interval in nanoseconds as you can see in the sample logstash.yml here.

Note that the unit value (s) is required. Values without a qualifier (e.g. 60) are treated as nanoseconds.
Setting the interval this way is not recommended and might change in later versions.

There is an open issue about making the default in seconds if you do not specify a qualifier, but it is still open since 2018.

Thanks! I've posted an update to the Github case about this.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.