# Read timed out when using Elasticsearch filter in pipeline

**URL:** <https://discuss.elastic.co/t/read-timed-out-when-using-elasticsearch-filter-in-pipeline/294438>\
**Category:** Logstash\
**Created:** [January 14, 2022, 5:29pm UTC](https://discuss.elastic.co/t/read-timed-out-when-using-elasticsearch-filter-in-pipeline/294438 "2022-01-14T17:29:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SamW](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samw/32/100342_2.png) [@SamW](https://discuss.elastic.co/u/SamW)\
**Post date:** [January 14, 2022, 5:29pm UTC](https://discuss.elastic.co/t/read-timed-out-when-using-elasticsearch-filter-in-pipeline/294438/1 "2022-01-14T17:29:28Z")

</div>

As part of my project's workflow, we have a pipeline which uses the Elasticsearch filter plugin a few times in order to find a set of items which need to be deleted from several indices. This always works perfectly when called manually for a single data input, but when called as part of a large data submission, we end up with a 'Read timed out' error ('Failed to query Elasticsearch for previous event') on some of those Elasticsearch filter queries.

From this thread, I learned that the Elasticsearch filter is rather heavy, which explains why we occasionally get this error when the pipeline is called many times for a large data ingestion, but unfortunately no solution was proposed:  
[Elasticsearch input missing [@metadata][\_index] - Elastic Stack / Logstash - Discuss the Elastic Stack](https://discuss.elastic.co/t/elasticsearch-input-missing-metadata-index/223594/13)

While the Elasticsearch input and output plugins seem to have various timeout options, I cannot see one for the Elasticsearch filter plugin. We've not set a global timeout for queries in our Elasticsearch instance, so is there any way to resolve this without completely re-organising how we do things?

---

<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:** [February 11, 2022, 5:29pm UTC](https://discuss.elastic.co/t/read-timed-out-when-using-elasticsearch-filter-in-pipeline/294438/2 "2022-02-11T17:29:39Z")

</div>

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