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

**URL:** <https://discuss.elastic.co/t/logstash-automatic-config-reload-and-config-reload-interval-high-cpu-usage/353805>\
**Category:** Logstash\
**Created:** [February 21, 2024, 3:50pm UTC](https://discuss.elastic.co/t/logstash-automatic-config-reload-and-config-reload-interval-high-cpu-usage/353805 "2024-02-21T15:50:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel314](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel314/32/21668_2.png) [@Daniel314](https://discuss.elastic.co/u/Daniel314)\
**Post date:** [February 21, 2024, 3:50pm UTC](https://discuss.elastic.co/t/logstash-automatic-config-reload-and-config-reload-interval-high-cpu-usage/353805/1 "2024-02-21T15:50:54Z")

</div>

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](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

```

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 21, 2024, 4:06pm UTC](https://discuss.elastic.co/t/logstash-automatic-config-reload-and-config-reload-interval-high-cpu-usage/353805/2 "2024-02-21T16:06:19Z")

</div>

> [@Daniel314](#):
>
> 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)?

No, the time qualifier is required since [version 6.X,](https://www.elastic.co/guide/en/logstash/6.0/breaking-changes.html#_application_settings) if you do not specify it is treated as a interval in nanoseconds as you can see in the sample `logstash.yml` [here](https://github.com/elastic/logstash/blob/2c89bcfc7bd453a849875dd1e27b0f491a210240/config/logstash.yml#L102-L107).

> 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](https://github.com/elastic/logstash/issues/8947) about making the default in seconds if you do not specify a qualifier, but it is still open since 2018.

---

<div class="post-metadata">

**Author:** ![Daniel314](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel314/32/21668_2.png) [@Daniel314](https://discuss.elastic.co/u/Daniel314)\
**Post date:** [February 22, 2024, 5:35pm UTC](https://discuss.elastic.co/t/logstash-automatic-config-reload-and-config-reload-interval-high-cpu-usage/353805/3 "2024-02-22T17:35:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 21, 2024, 5:35pm UTC](https://discuss.elastic.co/t/logstash-automatic-config-reload-and-config-reload-interval-high-cpu-usage/353805/4 "2024-03-21T17:35:45Z")

</div>

Closed on March 21, 2024, 5:35pm UTC

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