# Logstash-filter-elasticsearch - Cannot get new connection from pool

**URL:** <https://discuss.elastic.co/t/logstash-filter-elasticsearch-cannot-get-new-connection-from-pool/90941>\
**Category:** Logstash\
**Created:** [June 27, 2017, 10:13am UTC](https://discuss.elastic.co/t/logstash-filter-elasticsearch-cannot-get-new-connection-from-pool/90941 "2017-06-27T10:13:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fpr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fpr/32/20088_2.png) [@fpr](https://discuss.elastic.co/u/fpr)\
**Post date:** [June 27, 2017, 10:13am UTC](https://discuss.elastic.co/t/logstash-filter-elasticsearch-cannot-get-new-connection-from-pool/90941/1 "2017-06-27T10:13:44Z")

</div>

Hi, logstash-filter-elasticsearch throws this error on high load:  
`
[2017-06-27T11:58:03,714][WARN][logstash.filters.elasticsearch] Failed to query elasticsearch for previous event {:index=>"combine-inbound-2017.06.27", :query=>"ip:10.10.10.10", :event=>2017-06-27T09:57:40.000Z 172.16.1.4 %{message}, :error=>#<Elasticsearch::Transport::Transport::Error: Cannot get new connection from pool.>}
`

Logstash config:  
`
...
elasticsearch {
hosts => ["localhost:9200"]
index => "combine-inbound-2017.06.27"
enable_sort => false
periodic_flush => true
query => "ip:%{[netflow][ipv4_src_addr]}"
fields => {"notes" => "alert"}
}
...
`

The server is already "tuned" for elasticsearch:  
`
net.core.somaxconn=65535
vm.max_map_count=262144
fs.file-max=518144`

elasticsearch soft nofile 65535  
elasticsearch hard nofile 65535  
elasticsearch soft memlock unlimited  
elasticsearch hard memlock unlimited

As this is a setup for testing, i am running just one node.

Has anyone an idea how to solve this or what to search for?

---

<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:** [July 25, 2017, 10:14am UTC](https://discuss.elastic.co/t/logstash-filter-elasticsearch-cannot-get-new-connection-from-pool/90941/2 "2017-07-25T10:14:10Z")

</div>

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