# Kafka plugin makes logstash go into 100% CPU infinite loop

**URL:** <https://discuss.elastic.co/t/kafka-plugin-makes-logstash-go-into-100-cpu-infinite-loop/38259>\
**Category:** Logstash\
**Created:** [January 2, 2016, 7:13pm UTC](https://discuss.elastic.co/t/kafka-plugin-makes-logstash-go-into-100-cpu-infinite-loop/38259 "2016-01-02T19:13:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omar\_Al\_Zabir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/omar_al_zabir/32/5943_2.png) [@Omar\_Al\_Zabir](https://discuss.elastic.co/u/Omar_Al_Zabir)\
**Post date:** [January 2, 2016, 7:13pm UTC](https://discuss.elastic.co/t/kafka-plugin-makes-logstash-go-into-100-cpu-infinite-loop/38259/1 "2016-01-02T19:13:09Z")

</div>

I am using Kafka plugin in logstash to read items and push to ES. After processing 3M messages, I can see the logstash process remains at 100% CPU continuously, although it is doing nothing.

Here's my config:

```
input {
        beats {
                port => 5048
                        type => 'hit'
        }
        kafka {
                zk_connect => "10.35.132.117:2181,10.187.147.57:2181,10.187.147.58:2181"
                        topic_id => "rsyslog_logstash"
                        reset_beginning => false
                        type => "kafka"
        }
}

filter {
                drop {}
        }

        if [type] == "kafka" {
                date {
                        match => ["timestamp", "ISO8601"]
                        locale => "en"
                }
        }

        metrics {
                meter => "events"
                        add_tag => "metric"
        }
}
output {
        if "metric" in [tags] {
                stdout {
                        codec => line {
                                format => "rate: %{[events][rate_1m]}"
                        }
                }
        }

        if [fingerprint] {
                elasticsearch {
                        hosts => ["10.35.76.37","10.35.132.143","10.35.132.142"]
                                index => "hits-%{+YYYY.MM.dd}"
                                template => "./conf/hits.json"
                                template_name => "hits"
                                document_type => "hit"
                                template_overwrite => true
                                manage_template => true
                                flush_size => "1000"
                }
        } else {
        }
}

```

kill did not kill the process. Had to do kill -3.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 2, 2016, 8:08pm UTC](https://discuss.elastic.co/t/kafka-plugin-makes-logstash-go-into-100-cpu-infinite-loop/38259/2 "2016-01-02T20:08:55Z")

</div>

See [https://github.com/logstash-plugins/logstash-input-kafka/issues/52](https://github.com/logstash-plugins/logstash-input-kafka/issues/52)

---

<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:** [July 6, 2017, 5:17am UTC](https://discuss.elastic.co/t/kafka-plugin-makes-logstash-go-into-100-cpu-infinite-loop/38259/3 "2017-07-06T05:17:02Z")

</div>


