Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid getting stuck on infinite loop #730

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hasnat
Copy link

@hasnat hasnat commented Feb 1, 2018

If we get 400 which could be part of DLQ, plugin here gets stuck in loop indefinitely on retry
e.g. https://discuss.elastic.co/t/logstash-5-6-1-inifinite-loop-encountered-a-retryable-error/101753

Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/

If we get 400 which could be part of DLQ, plugin here gets stuck in loop indefinitely on retry
e.g. https://discuss.elastic.co/t/logstash-5-6-1-inifinite-loop-encountered-a-retryable-error/101753
@jordansissel
Copy link
Contributor

This will cause data loss when queue.type: memory. For these scenarios, you can circumvent the safety here by interrupting logstash two times: the first time it will try to safely shutdown, and a second time should cause it to abandon safety and exit.

The reported error "[2017-09-25T19:54:44,850][ERROR][logstash.outputs.elasticsearch] Encountered a retryable error. Will Retry with exponential backoff {:code=>400, :url=>"http://es-data-int.ex.com:9200/_bulk", :body=>"{"error":{"root_cause":[{"type":"parse_exception","reason":"request body is required"}],"type":"parse_exception","reason":"request body is required"},"status":400}"}" in the discuss forum, "request body is required" is a bug, not a feature, and we should fix that bug.

@jordansissel
Copy link
Contributor

For reasons stated above, Logstash has a default mechanism of safe shutdown. If you wish to abandon this safety, that is a choice you can make, but we will not make this unsafe (abandon the retry) the default behavior.

@hasnat
Copy link
Author

hasnat commented Feb 1, 2018

thanks for the explaining @jordansissel
I never knew those 400s were due to a different bug, my goal is to pass down all the 400s to dead letter queue. Would there be a way to do this via config instead of sending interrupt signals to logstash?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants