# Logstash exec input timeout

**URL:** https://discuss.elastic.co/t/logstash-exec-input-timeout/57374
**Category:** Logstash
**Created:** [August 5, 2016, 4:39pm UTC](https://discuss.elastic.co/t/logstash-exec-input-timeout/57374 "2016-08-05T16:39:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![vinnyoodles](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinnyoodles/32/11235_2.png) [@vinnyoodles](https://discuss.elastic.co/u/vinnyoodles)
#### Post date: [August 5, 2016, 4:39pm UTC](https://discuss.elastic.co/t/logstash-exec-input-timeout/57374/1 "2016-08-05T16:39:01Z")

</div>

I'm getting this error with the exec input for logstash. It's pretty sporadic when the error comes up. For example, it'll timeout once in about every 10 executions. Is there anyway I can kill any commands that are taking longer than a given time?

`Execution ran longer than the interval. Skipping sleep. {:command=>" top -bn 1 | grep mongod ", :duration=>23.284, :interval=>5, :level=>:warn}`

---

<div class="post-metadata">

### Author: ![vinnyoodles](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinnyoodles/32/11235_2.png) [@vinnyoodles](https://discuss.elastic.co/u/vinnyoodles)
#### Post date: [August 8, 2016, 2:13pm UTC](https://discuss.elastic.co/t/logstash-exec-input-timeout/57374/2 "2016-08-08T14:13:27Z")

</div>

bump

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [August 10, 2016, 7:38am UTC](https://discuss.elastic.co/t/logstash-exec-input-timeout/57374/3 "2016-08-10T07:38:48Z")

</div>

That's odd. Does the same thing happen if you run e.g. `ps aux` instead?

---

<div class="post-metadata">

### Author: ![vinnyoodles](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinnyoodles/32/11235_2.png) [@vinnyoodles](https://discuss.elastic.co/u/vinnyoodles)
#### Post date: [August 10, 2016, 2:16pm UTC](https://discuss.elastic.co/t/logstash-exec-input-timeout/57374/4 "2016-08-10T14:16:57Z")

</div>

Yeah, it happens for `ps aux` as well as `mongostat`

```auto
Execution ran longer than the interval. Skipping sleep. {:command=>"ps aux | grep mongo | tail -n 1", :duration=>22.485, :interval=>5, :level=>:warn}

Execution ran longer than the interval. Skipping sleep. {:command=>"mongostat --noheaders -n 1 ", :duration=>23.773, :interval=>5, :level=>:warn}   

```

---

<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, 4:44am UTC](https://discuss.elastic.co/t/logstash-exec-input-timeout/57374/5 "2017-07-06T04:44:00Z")

</div>


