# Logstash elasticsearch output plugin crashes elasticsearch

**URL:** <https://discuss.elastic.co/t/logstash-elasticsearch-output-plugin-crashes-elasticsearch/171930>\
**Category:** Logstash\
**Created:** [March 12, 2019, 11:08am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-output-plugin-crashes-elasticsearch/171930 "2019-03-12T11:08:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hagit](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hagit](https://discuss.elastic.co/u/hagit)\
**Post date:** [March 12, 2019, 11:08am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-output-plugin-crashes-elasticsearch/171930/1 "2019-03-12T11:08:28Z")

</div>

Hi,

I am using logstash 6.5.4 with elasticsearch output plugin to index 15M documents and it keeps crashing my elasticsearch (6.5.4). I'm getting:

`[WARN][logstash.outputs.elasticsearch] Marking url as dead. Last error: [LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError] Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketTimeout] Read timed out {:url=>http://localhost:9200/, :error_message=>"Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketTimeout] Read timed out", :error_class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError"}`  
`[ERROR][logstash.outputs.elasticsearch] Attempted to send a bulk request to elasticsearch' but Elasticsearch appears to be unreachable or down! {:error_message=>"Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketTimeout] Read timed out", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError", :will_retry_in_seconds=>2}`

My configuration:

```
input {  
    jdbc { 
        jdbc_connection_string => "jdbc:sqlserver://localhost;database=XXX;user=xxx;password=xxx"
        jdbc_user => nil
        jdbc_driver_library => "C:\Program Files\Microsoft JDBC Driver 6.2 for SQL Server\sqljdbc_6.2\enu\jre8\sqljdbc4-3.0.jar"
        jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"

        jdbc_fetch_size => 500

       statement => "..."
    }
}

filter {
    ruby {
        code => 'event.set("[my_suggest][contexts][location]", [{"lat" => event.get("my_suggest.contexts.location.lat"),"lon" => event.get("my_suggest.contexts.location.lon")}]) if event.get("my_suggest.contexts.location.lon");'
    }
    
    mutate {
        remove_field => "my_suggest.contexts.location.lat"
        remove_field => "my_suggest.contexts.location.lon"
        rename => {
            "my_suggest.input" => "[my_suggest][input]"
            "my_suggest.weight" => "[my_suggest][weight]"
        }
    }
}

output {
    elasticsearch {
        hosts => ["localhost:9200"]
        index => "my_index"
    }  
}

```

Please advise. Thank you.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 12, 2019, 11:23am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-output-plugin-crashes-elasticsearch/171930/2 "2019-03-12T11:23:06Z")

</div>

Is there anything in the Elasticsearch logs??

---

<div class="post-metadata">

**Author:** ![hagit](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hagit](https://discuss.elastic.co/u/hagit)\
**Post date:** [March 12, 2019, 11:29am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-output-plugin-crashes-elasticsearch/171930/3 "2019-03-12T11:29:00Z")

</div>

Thanks for the fast response.  
In elasticsearch\_production.log I get this warning:

`[WARN][o.e.m.j.JvmGcMonitorService] [node_master_data_1] [gc][7165] overhead, spent [608ms] collecting in the last [1s]`

And indeed increasing the heap size in jvm.options seems to solve the problem.  
Sorry - I missed this log between the other files under the directory... 😶

---

<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:** [April 9, 2019, 11:29am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-output-plugin-crashes-elasticsearch/171930/4 "2019-04-09T11:29:05Z")

</div>

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