# Cannot get new connection from pool while using logstash's elasticsearch filter plugin

**URL:** <https://discuss.elastic.co/t/cannot-get-new-connection-from-pool-while-using-logstashs-elasticsearch-filter-plugin/78884>\
**Category:** Elasticsearch\
**Created:** [March 16, 2017, 3:03pm UTC](https://discuss.elastic.co/t/cannot-get-new-connection-from-pool-while-using-logstashs-elasticsearch-filter-plugin/78884 "2017-03-16T15:03:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.elastic.co/u/asp)\
**Post date:** [March 16, 2017, 3:03pm UTC](https://discuss.elastic.co/t/cannot-get-new-connection-from-pool-while-using-logstashs-elasticsearch-filter-plugin/78884/1 "2017-03-16T15:03:28Z")

</div>

Hi,

I am using logstash-elasticsearch filter plugin in logstash.  
I request an entitiy-centric index by document\_id which should be as fast as possible.

During processing I get a lot of error messages in logstash:  
ELK + filebeat runnning on the same machine (single instance) during this test.

This is the error I got:

```
15:41:48.152 [[main]>worker6] WARN logstash.filters.elasticsearch - Failed to query elasticsearch for previous event {:index=>"entity-centric-ua-*", :query=>"_id: \"0x583b9fa8 0x0 0x407 0x0\"", :event=>2016-11-28T03:17:00.000Z xyzblabla, :error=>#<Elasticsearch::Transport::Transport::Error: Cannot get new connection from pool.>}

```

From 222k events 114 got the error above .

I think ES is overloaded. What do I need to tune?  
During this test I only tested imported the data, no parallel access on kibana during processing, which is not real live. I guess it will get worse if I move it on production.

Any help is appreciated.

Versions:  
kibana, elasticsearch, filebeat: 5.1.2  
logstash: 5.2.2

Shards:  
data index and entry-centric-index have both 5 primary shards, 1 replica. Entity-centric index is rotated per week, data index per day. But both have been empty before starting the test. TestData only contains a few hours.

Thanks, Andreas

---

<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 13, 2017, 3:03pm UTC](https://discuss.elastic.co/t/cannot-get-new-connection-from-pool-while-using-logstashs-elasticsearch-filter-plugin/78884/2 "2017-04-13T15:03:53Z")

</div>

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