logstash-plugins / logstash-output-http

Apache License 2.0
35 stars 81 forks source link

HTTP 500 POSTs are retried when retry_non_idempotent flag is false #105

Open danhermann opened 5 years ago

danhermann commented 5 years ago

With the following test config:

input {
  generator {
    count => 10 # Emit all lines n times, 0 is unlimited
  }
}

output {
    http {
        url => "https://httpstat.us/500"
        http_method => "post"
        format => "json"
        #retry_non_idempotent => false
    }
}

When retryable_codes are left at their default value that includes 500, HTTP 500 responses to POSTs are retried even though retry_non_idempotent defaults to false.

kares commented 4 years ago

for anyone following here, this is caused by retry_non_idempotent being a http client flag atm. so a retry will be made by a client if creating the connection fails (e.g. with an io error or timeout). retry_non_idempotent does not apply for the plugin's retry mechanism. while its confusing to read a conf such as above and see the behavior - changing these are going to end up in breaking changes ...