# Logstash CPU usage 150%

**URL:** <https://discuss.elastic.co/t/logstash-cpu-usage-150/130463>\
**Category:** Logstash\
**Created:** [May 3, 2018, 1:51pm UTC](https://discuss.elastic.co/t/logstash-cpu-usage-150/130463 "2018-05-03T13:51:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akaren](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@Akaren](https://discuss.elastic.co/u/Akaren)\
**Post date:** [May 3, 2018, 1:51pm UTC](https://discuss.elastic.co/t/logstash-cpu-usage-150/130463/1 "2018-05-03T13:51:26Z")

</div>

Hi, we are having logstash 5.6.3, our logstash config contains many filters, add field, geoip and also aggregate. It's long and complicated. We had to set pipeline.workers to 1 because of aggregate module.

But sometimes logstash get "stuck", doesn't parse any events and CPU usage is high:

 ![logstash](https://us1.discourse-cdn.com/elastic/original/3X/8/9/89e170986ef0b66152e01748611fa84e361e5a19.png)

If we restart it, it starts working again. The only error that is in log, is

`[2018-05-03T14:40:37,226][ERROR][logstash.filters.ruby] Ruby exception occurred: bad value for range`

It doesn't says much...  
Any idea what to do?

---

<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:** [May 31, 2018, 1:51pm UTC](https://discuss.elastic.co/t/logstash-cpu-usage-150/130463/2 "2018-05-31T13:51:26Z")

</div>

Closed on May 31, 2018, 1:51pm UTC

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