# Logstash 2.4.1 silently fails if using 2 outputs

**URL:** <https://discuss.elastic.co/t/logstash-2-4-1-silently-fails-if-using-2-outputs/128719>\
**Category:** Logstash\
**Created:** [April 19, 2018, 2:03pm UTC](https://discuss.elastic.co/t/logstash-2-4-1-silently-fails-if-using-2-outputs/128719 "2018-04-19T14:03:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sloniki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sloniki/32/12570_2.png) [@sloniki](https://discuss.elastic.co/u/sloniki)\
**Post date:** [April 19, 2018, 2:03pm UTC](https://discuss.elastic.co/t/logstash-2-4-1-silently-fails-if-using-2-outputs/128719/1 "2018-04-19T14:03:33Z")

</div>

If I try to use two outputs:

```
output {

  elasticsearch {
    hosts => ["192.168.1.1", "192.168.1.2"]
  }

  if "prod" in [tags] {
    udp {
      host => "192.168.1.3"
      port => 6177
    }
  }

}

```

logstash works ~10-15 min and silently stops without any error messages in logs.  
CPU spikes up to 50-60% before failure.  
Single elasticsearch output is working fine.

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [April 19, 2018, 2:31pm UTC](https://discuss.elastic.co/t/logstash-2-4-1-silently-fails-if-using-2-outputs/128719/2 "2018-04-19T14:31:32Z")

</div>

Hi,

Can you share your logstash.yml, CPU, as well as how much RAM the logstash server has.  
Presumably worker usage is spiking and then failing after some time, debug logging may show more:  
`--debug` - [https://www.elastic.co/guide/en/logstash/2.4/command-line-flags.html](https://www.elastic.co/guide/en/logstash/2.4/command-line-flags.html)

This is always handy: [https://www.elastic.co/guide/en/logstash/2.4/performance-troubleshooting.html](https://www.elastic.co/guide/en/logstash/2.4/performance-troubleshooting.html)

---

<div class="post-metadata">

**Author:** ![sloniki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sloniki/32/12570_2.png) [@sloniki](https://discuss.elastic.co/u/sloniki)\
**Post date:** [April 19, 2018, 2:53pm UTC](https://discuss.elastic.co/t/logstash-2-4-1-silently-fails-if-using-2-outputs/128719/3 "2018-04-19T14:53:51Z")

</div>

It seems that this version doesn't have logstash.yml by default.  
The box has 8Gb RAM and 4Gb for JVM heap  
`-Xmx4g`  
Unfortunately, this is a production system, and I'm limited in experimenting with debugging options. And the problem is not reproducible in dev.  
But I'll try to play with worker settings from your link, thank you.

---

<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 17, 2018, 2:54pm UTC](https://discuss.elastic.co/t/logstash-2-4-1-silently-fails-if-using-2-outputs/128719/4 "2018-05-17T14:54:07Z")

</div>

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