# CPU usage 100% when Elasticsearch is down (Act 2)

**URL:** <https://discuss.elastic.co/t/cpu-usage-100-when-elasticsearch-is-down-act-2/193997>\
**Category:** Beats\
**Created:** [August 6, 2019, 11:32am UTC](https://discuss.elastic.co/t/cpu-usage-100-when-elasticsearch-is-down-act-2/193997 "2019-08-06T11:32:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fredrik.jonsson](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@fredrik.jonsson](https://discuss.elastic.co/u/fredrik.jonsson)\
**Post date:** [August 6, 2019, 11:32am UTC](https://discuss.elastic.co/t/cpu-usage-100-when-elasticsearch-is-down-act-2/193997/1 "2019-08-06T11:32:38Z")

</div>

This is a continue of, [CPU usage 100% when Elasticsearch is down](https://discuss.elastic.co/t/cpu-usage-100-when-elasticsearch-is-down/185850), which was automatically closed during vacation.

The issue was this,  
"I noticed that when Elasticsearch can't retrieve any more data the beats sending data went up to 100% CPU usage.  
E.g. if the disc is full on the Elasticsearch server.  
After clear up some space and "reset" Elasticsearch to be able to retrive data the CPU for the beats went down to normal behaviour.

It is never OK to use that much CPU and risk the other process running on the same machine.  
Better loosing data than that the services stop working!

Is this a bug or can I config the beats in a better way?"

Here is the filebeat config:

```
filebeat.inputs:

```

# Each - is an input. Most options can be set at the input level, so

# you can use different inputs for various configurations.

# Below are the input specific configurations.

- type: log

I don't have any logs left from that time but it is easy to reproduce for you.  
Just make sure the beat can't access elasticsearch and the CPU will consume 100%

/Fredrik

---

<div class="post-metadata">

**Author:** ![fredrik.jonsson](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@fredrik.jonsson](https://discuss.elastic.co/u/fredrik.jonsson)\
**Post date:** [August 6, 2019, 11:51am UTC](https://discuss.elastic.co/t/cpu-usage-100-when-elasticsearch-is-down-act-2/193997/2 "2019-08-06T11:51:20Z")

</div>

Actually I noticed that logstash does the same. CPU is at 200-300% constantly as long as elasticsearch is unavailble.

/Fredrik

---

<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:** [September 3, 2019, 1:51pm UTC](https://discuss.elastic.co/t/cpu-usage-100-when-elasticsearch-is-down-act-2/193997/3 "2019-09-03T13:51:37Z")

</div>

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