# Trying to create too many scroll contexts. Must be less than or equal to: \[500\]. This limit can be set by changing the \[search.max\_open\_scroll\_context\] setting

**URL:** <https://discuss.elastic.co/t/trying-to-create-too-many-scroll-contexts-must-be-less-than-or-equal-to-500-this-limit-can-be-set-by-changing-the-search-max-open-scroll-context-setting/208884>\
**Category:** Elasticsearch\
**Created:** [November 21, 2019, 12:18pm UTC](https://discuss.elastic.co/t/trying-to-create-too-many-scroll-contexts-must-be-less-than-or-equal-to-500-this-limit-can-be-set-by-changing-the-search-max-open-scroll-context-setting/208884 "2019-11-21T12:18:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gokulnath](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Gokulnath](https://discuss.elastic.co/u/Gokulnath)\
**Post date:** [November 21, 2019, 12:18pm UTC](https://discuss.elastic.co/t/trying-to-create-too-many-scroll-contexts-must-be-less-than-or-equal-to-500-this-limit-can-be-set-by-changing-the-search-max-open-scroll-context-setting/208884/1 "2019-11-21T12:18:59Z")

</div>

Hey Team,  
Greetings...I am new to elasticsearch. Im getting this error."Trying to create too many scroll contexts. Must be less than or equal to: [500]. This limit can be set by changing the [search.max\_open\_scroll\_context] setting".  
I have 3 data nodes. Shall I try to increase the count as ```  
"search.max\_open\_scroll\_context": 1024 ? Is it a good approach?

```auto

Thanks in advance.
```

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [November 21, 2019, 12:25pm UTC](https://discuss.elastic.co/t/trying-to-create-too-many-scroll-contexts-must-be-less-than-or-equal-to-500-this-limit-can-be-set-by-changing-the-search-max-open-scroll-context-setting/208884/2 "2019-11-21T12:25:11Z")

</div>

Hi Gokulnath,

Scroll contexts are expensive to maintain which is why we limit the number of concurrent scrolls allowed. See [Impact of multiple concurrent scroll API on ElasticSearch](https://discuss.elastic.co/t/impact-of-multiple-concurrent-scroll-api-on-elasticsearch/206805/2)

---

<div class="post-metadata">

**Author:** ![Gokulnath](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Gokulnath](https://discuss.elastic.co/u/Gokulnath)\
**Post date:** [November 21, 2019, 12:45pm UTC](https://discuss.elastic.co/t/trying-to-create-too-many-scroll-contexts-must-be-less-than-or-equal-to-500-this-limit-can-be-set-by-changing-the-search-max-open-scroll-context-setting/208884/3 "2019-11-21T12:45:47Z")

</div>

Thanks for fast reply.  
We planned to clear the scroll context from application side, I came to know that scroll context will get auto cleared after the time which we specify.  
Could you please suggest me that which one is correct?  
a.) wait until elasticsearch to auto cleared.(I think it will not work for my case.)  
b.) manually delete the scroll context.(If so, will it affect any other functionality of elasticsearch?)

Thanks for your time.

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [November 21, 2019, 1:19pm UTC](https://discuss.elastic.co/t/trying-to-create-too-many-scroll-contexts-must-be-less-than-or-equal-to-500-this-limit-can-be-set-by-changing-the-search-max-open-scroll-context-setting/208884/4 "2019-11-21T13:19:48Z")

</div>

The scroll context is reserved for a time period. Either it lapses and is auto-cleared after the time is up or your app is courteous and clears the context when it is finished to free up the resources after you no longer need them

---

<div class="post-metadata">

**Author:** ![Gokulnath](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Gokulnath](https://discuss.elastic.co/u/Gokulnath)\
**Post date:** [November 21, 2019, 1:35pm UTC](https://discuss.elastic.co/t/trying-to-create-too-many-scroll-contexts-must-be-less-than-or-equal-to-500-this-limit-can-be-set-by-changing-the-search-max-open-scroll-context-setting/208884/5 "2019-11-21T13:35:15Z")

</div>

Thanks a lot Mark.

---

<div class="post-metadata">

**Author:** ![Gokulnath](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@Gokulnath](https://discuss.elastic.co/u/Gokulnath)\
**Post date:** [November 22, 2019, 6:54am UTC](https://discuss.elastic.co/t/trying-to-create-too-many-scroll-contexts-must-be-less-than-or-equal-to-500-this-limit-can-be-set-by-changing-the-search-max-open-scroll-context-setting/208884/6 "2019-11-22T06:54:53Z")

</div>

Is it possible to take the scroll contexts count?. If so kindly help me to get the count. Because I want to track how many total Scroll contexts are there.

Thanks in advance

---

<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:** [December 20, 2019, 6:55am UTC](https://discuss.elastic.co/t/trying-to-create-too-many-scroll-contexts-must-be-less-than-or-equal-to-500-this-limit-can-be-set-by-changing-the-search-max-open-scroll-context-setting/208884/7 "2019-12-20T06:55:02Z")

</div>

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