# Elasticsearch 5.2.2 cluster runs OutOfMemory when it gets query with many words

**URL:** <https://discuss.elastic.co/t/elasticsearch-5-2-2-cluster-runs-outofmemory-when-it-gets-query-with-many-words/102481>\
**Category:** Elasticsearch\
**Created:** [October 2, 2017, 8:06pm UTC](https://discuss.elastic.co/t/elasticsearch-5-2-2-cluster-runs-outofmemory-when-it-gets-query-with-many-words/102481 "2017-10-02T20:06:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srinivasan\_Ramaswamy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/srinivasan_ramaswamy/32/74106_2.png) [@Srinivasan\_Ramaswamy](https://discuss.elastic.co/u/Srinivasan_Ramaswamy)\
**Post date:** [October 2, 2017, 8:06pm UTC](https://discuss.elastic.co/t/elasticsearch-5-2-2-cluster-runs-outofmemory-when-it-gets-query-with-many-words/102481/1 "2017-10-02T20:06:25Z")

</div>

I have a 3 node elasticsearch cluster with version 5.2.2 and when i send a query that has \>70 words, the cluster runs out of memory and crashes. Interestingly, when the number of words is 30+ I get an error message "too\_many\_clauses maxClauseCount is set to 1024". I am wondering why we dont get the same error message when the number of words is more than 70.

I am using a multi match query with 13 fields and a function score on top of that. Am I doing something wrong or is there a bug with ES 5.2.2?

Thanks  
Srini

---

<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:** [October 30, 2017, 8:06pm UTC](https://discuss.elastic.co/t/elasticsearch-5-2-2-cluster-runs-outofmemory-when-it-gets-query-with-many-words/102481/2 "2017-10-30T20:06:32Z")

</div>

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