# exception=\>LogStash::Outputs::ElasticSearch::HttpClient::Pool::NoConnectionAvailableError

**URL:** <https://discuss.elastic.co/t/exception-logstash-noconnectionavailableerror/356549>\
**Category:** Elasticsearch\
**Created:** [April 1, 2024, 11:51am UTC](https://discuss.elastic.co/t/exception-logstash-noconnectionavailableerror/356549 "2024-04-01T11:51:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KARTHIKEYANI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karthikeyani/32/123547_2.png) [@KARTHIKEYANI](https://discuss.elastic.co/u/KARTHIKEYANI)\
**Post date:** [April 1, 2024, 11:51am UTC](https://discuss.elastic.co/t/exception-logstash-noconnectionavailableerror/356549/1 "2024-04-01T11:51:15Z")

</div>

Hi Team,  
Elasticsearch connection is up and running. We have total 260000 documents. In this 30K copied after that we get the error

Attempted to send a bulk request but there are no living connections in the pool (perhaps Elasticsearch is unreachable or down?) {:message=\>"No Available connections", :exception=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::NoConnectionAvailableError, :will\_retry\_in\_seconds=\>64}

below is the logstash conf we use

input{  
elasticsearch {  
hosts =\> ["host1"]  
index =\> "test-index-_"  
user =\> "user"  
password =\> "password"  
query =\> '{ "query": { "query\_string": { "query": "_" } } }'  
size =\> 5000  
scroll =\> "10m"  
slices =\> 8  
docinfo =\> true  
docinfo\_target =\> "@metadata"  
ssl =\> false  
ca\_file =\> "/usr/share/logstash/elasticsearch/ca.crt"  
}  
}  
filter {  
ruby {  
code =\> "  
indexName = event.get('[@metadata][\_index]').split('-')  
indexDate = indexName[1] if indexName.length \> 1  
if !(indexName.is\_a?(Array) && indexName.length \> 1)  
indexName[1] = ''  
end  
event.set('[@metadata][index\_date]', indexDate)  
"  
}  
mutate { remove\_field =\> ["index\_date"] }  
}  
output {

```
#stdout { codec => rubydebug { metadata => true } }
elasticsearch {
  hosts => ["host1"]
  user => "user"
  password => "password"
  index => "test-index1-%{[@metadata][index_date]}"
  ssl => true
  ssl_certificate_verification => false
  doc_as_upsert => true 
  action => "update"
  ilm_enabled => false
  http_compression => true
  timeout => 180
  pool_max => 10000
  pool_max_per_route => 1000
  validate_after_inactivity => 5000
  resurrect_delay => 120
}

```

}

---

<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 29, 2024, 11:51am UTC](https://discuss.elastic.co/t/exception-logstash-noconnectionavailableerror/356549/2 "2024-04-29T11:51:38Z")

</div>

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