# Logstash HTTP output retries forever on failure

**URL:** <https://discuss.elastic.co/t/logstash-http-output-retries-forever-on-failure/141239>\
**Category:** Logstash\
**Created:** [July 23, 2018, 6:51pm UTC](https://discuss.elastic.co/t/logstash-http-output-retries-forever-on-failure/141239 "2018-07-23T18:51:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![darafield](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@darafield](https://discuss.elastic.co/u/darafield)\
**Post date:** [July 23, 2018, 6:51pm UTC](https://discuss.elastic.co/t/logstash-http-output-retries-forever-on-failure/141239/1 "2018-07-23T18:51:15Z")

</div>

We are using Logstash 6.2.4. We have two outputs configured: all data goes to Elasticsearch and some data also goes to an HTTP endpoint that is not always running when we are testing. In the case when the endpoint is not running, we receive a connect timed out error (fine), but Logstash keeps trying to send the data over and over even though we are using the default automatic\_retries of 1. How can we configure Logstash to only retry a limited number of times?

Also, after a while of retrying the HTTP output, Logstash seems to give up on either processing new input or on sending it to Elasticsearch (haven't traced down where the problem is, just know that out data no longer gets into Elasticsearch).

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 23, 2018, 7:02pm UTC](https://discuss.elastic.co/t/logstash-http-output-retries-forever-on-failure/141239/2 "2018-07-23T19:02:30Z")

</div>

> [@darafield](#):
>
> Also, after a while of retrying the HTTP output, Logstash seems to give up on either processing new input or on sending it to Elasticsearch (haven't traced down where the problem is, just know that out data no longer gets into Elasticsearch).

Well, yes. If the pipeline is full then backpressure will prevent it ingesting additional events.

If I am reading the code correctly there are two levels of retries. automatic\_retries configures the inner one. retry\_failed can be used to disable the outer one.

---

<div class="post-metadata">

**Author:** ![darafield](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@darafield](https://discuss.elastic.co/u/darafield)\
**Post date:** [July 23, 2018, 7:07pm UTC](https://discuss.elastic.co/t/logstash-http-output-retries-forever-on-failure/141239/3 "2018-07-23T19:07:44Z")

</div>

I'm not sure what you mean by inner and outer retries. When we set retry\_failed to false, it won't retry at all. Why does it retry continuously when automatic\_retries is set to 1 (we even tested setting it to different values, including 0, 1 and 2 and it still retried continuously).

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 23, 2018, 7:18pm UTC](https://discuss.elastic.co/t/logstash-http-output-retries-forever-on-failure/141239/4 "2018-07-23T19:18:58Z")

</div>

> [@darafield](#):
>
> When we set retry\_failed to false, it won't retry at all.

I am not convinced that that it true. logstash will not log that logstash is retrying, but I don't think the inner retry in the Manticore client is disabled.

---

<div class="post-metadata">

**Author:** ![darafield](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@darafield](https://discuss.elastic.co/u/darafield)\
**Post date:** [July 23, 2018, 7:32pm UTC](https://discuss.elastic.co/t/logstash-http-output-retries-forever-on-failure/141239/5 "2018-07-23T19:32:42Z")

</div>

Thank you for your quick responses. I will do some more testing to verify, but it sounds like what we want is retry\_failed set to false and automatic\_retries set to some reasonable number.

---

<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:** [August 20, 2018, 7:32pm UTC](https://discuss.elastic.co/t/logstash-http-output-retries-forever-on-failure/141239/6 "2018-08-20T19:32:50Z")

</div>

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