# Inifinite-loop-encountered-a-retryable-error 400 error from Elasticsearch

**URL:** <https://discuss.elastic.co/t/inifinite-loop-encountered-a-retryable-error-400-error-from-elasticsearch/119290>\
**Category:** Logstash\
**Created:** [February 9, 2018, 6:12pm UTC](https://discuss.elastic.co/t/inifinite-loop-encountered-a-retryable-error-400-error-from-elasticsearch/119290 "2018-02-09T18:12:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Hodges](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@Christopher\_Hodges](https://discuss.elastic.co/u/Christopher_Hodges)\
**Post date:** [February 9, 2018, 6:12pm UTC](https://discuss.elastic.co/t/inifinite-loop-encountered-a-retryable-error-400-error-from-elasticsearch/119290/1 "2018-02-09T18:12:29Z")

</div>

Apologies if this is not the way to continue the discussion on a closed topic. But has [Logstash 5.6.1 inifinite loop? Encountered a retryable error](https://discuss.elastic.co/t/logstash-5-6-1-inifinite-loop-encountered-a-retryable-error/101753/16) been resolved?

We are seeing the same issue running Logstash 5.6.5. We see repeated 400 errors with the message 'Encountered a retryable error. Will Retry with exponential backoff ' that accumulate until the Logstash instance fails and no longer processes logs. We are unsure why Logstash stops processing, possibly file handlers, as in [IOException: Too many open files - TCP input](https://discuss.elastic.co/t/ioexception-too-many-open-files-tcp-input/107547/16). There are no OOM errors.

Enabling debug on the elasticsearch output we get:  
{"level":"ERROR","loggerName":"logstash.outputs.elasticsearch","timeMillis":1517840567573,"thread":"[main]\>worker2","logEvent":{"message":"Encountered a retryable error. Will Retry with exponential backoff ","code":400,"url":"[http://127.0.0.1:9200/\_bulk","body":"](http://127.0.0.1:9200/_bulk%22,%22body%22:%22){"error":{"root\_cause":[{"type":"parse\_exception","reason":"request body is required"}],"type":"parse\_exception","reason":"request body is required"},"status":400}"}}

The errors pile up over time and are never dropped, which appears to be the expected behaviour.

We have DLQ enabled and do see some messages in it but none we believe are related to this issue.

The only way we have found to prevent Logstash from failing is to intermittently restart the process.

The machines have plenty of memory and -xms and -xmx are set at 4g.

Wer'e running Ubuntu 16.04.3

---

<div class="post-metadata">

**Author:** ![Christopher\_Hodges](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@Christopher\_Hodges](https://discuss.elastic.co/u/Christopher_Hodges)\
**Post date:** [February 14, 2018, 5:00pm UTC](https://discuss.elastic.co/t/inifinite-loop-encountered-a-retryable-error-400-error-from-elasticsearch/119290/2 "2018-02-14T17:00:29Z")

</div>

Created [https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/737](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/737) to address the issue.

---

<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:** [March 14, 2018, 5:00pm UTC](https://discuss.elastic.co/t/inifinite-loop-encountered-a-retryable-error-400-error-from-elasticsearch/119290/3 "2018-03-14T17:00:46Z")

</div>

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