# Too\_many\_scroll\_contexts\_exception

**URL:** https://discuss.elastic.co/t/too-many-scroll-contexts-exception/384981
**Category:** Elasticsearch
**Created:** [February 9, 2026, 3:58pm UTC](https://discuss.elastic.co/t/too-many-scroll-contexts-exception/384981 "2026-02-09T15:58:48Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [February 9, 2026, 3:58pm UTC](https://discuss.elastic.co/t/too-many-scroll-contexts-exception/384981/1 "2026-02-09T15:58:49Z")

</div>

elasticsearch -{"statusCode":500,"error":"Internal Server Error","message":"[search\_phase\_execution\_exception\n\tRoot causes:\n\t\ttoo\_many\_scroll\_contexts\_exception: 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.]: all shards failed"}

I have this issue since two week now. Seems like someone is executing too many scroll. I am trying to find out who and how this is happening.

when it happens kibana does not work. and some of the following curl does not work.

\_tasks?actions=indices:data/read/search\*&detailed=true&pretty

\_tasks?actions=indices:data/read/scroll&detailed=true

gives me no reply for server until I restart some of the data servers. which I know is not right way to fix this issue. any more suggestion on how to find this

---

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [February 12, 2026, 9:50pm UTC](https://discuss.elastic.co/t/too-many-scroll-contexts-exception/384981/2 "2026-02-12T21:50:27Z")

</div>

I am still facing this issue and can’t find out who is creating this. I am just deleting all scroll to just get by. hope someone has some insight in it.

---

<div class="post-metadata">

### Author: ![Musab\_Dogan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/musab_dogan/32/70691_2.png) [@Musab\_Dogan](https://discuss.elastic.co/u/Musab_Dogan)
#### Post date: [February 13, 2026, 8:48am UTC](https://discuss.elastic.co/t/too-many-scroll-contexts-exception/384981/3 "2026-02-13T08:48:33Z")

</div>

Hey Sachin,

If you have a license, you can enable audit logging to start diagnose where the request is coming from.

---

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [February 13, 2026, 7:11pm UTC](https://discuss.elastic.co/t/too-many-scroll-contexts-exception/384981/4 "2026-02-13T19:11:02Z")

</div>

I don’t have license.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [February 13, 2026, 7:44pm UTC](https://discuss.elastic.co/t/too-many-scroll-contexts-exception/384981/5 "2026-02-13T19:44:23Z")

</div>

I guess someone deployed some code that retrieves a lot of data using scrolling about two weeks ago. I can’t think of any way to find out the culprit without audit logging, which does require a license, so I would recommend asking around.

---

<div class="post-metadata">

### Author: ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)
#### Post date: [February 13, 2026, 10:20pm UTC](https://discuss.elastic.co/t/too-many-scroll-contexts-exception/384981/6 "2026-02-13T22:20:26Z")

</div>

Add a trial license ?

---

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [February 16, 2026, 8:14pm UTC](https://discuss.elastic.co/t/too-many-scroll-contexts-exception/384981/7 "2026-02-16T20:14:05Z")

</div>

hmm, I guess I will have to find most all code which using this and debug it.

this is production cluster, do not want to add trial license and then not work after it expires.

---

<div class="post-metadata">

### Author: ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)
#### Post date: [February 16, 2026, 8:44pm UTC](https://discuss.elastic.co/t/too-many-scroll-contexts-exception/384981/8 "2026-02-16T20:44:34Z")

</div>

> [@elasticforme](#):
>
> this is production cluster, do not want to add trial license and then not work after it expires.

The cluster can be reverted to basic (what you have now) license before trial ends. I am not saying it's a complete no-op, in fact I did make an error myself on this which was subject of an early Q by me on this very forum, but you are already better informed than I was so can take better care ... I believe it's manageable and feasible.

You could also try lowering limits for slowlog, and hope to be lucky?

---

<div class="post-metadata">

### Author: ![Musab\_Dogan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/musab_dogan/32/70691_2.png) [@Musab\_Dogan](https://discuss.elastic.co/u/Musab_Dogan)
#### Post date: [February 16, 2026, 10:51pm UTC](https://discuss.elastic.co/t/too-many-scroll-contexts-exception/384981/9 "2026-02-16T22:51:01Z")

</div>

If the HTTP layer security (HTTPS) is not active you can sniff the port 9200.

---

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [February 20, 2026, 10:07pm UTC](https://discuss.elastic.co/t/too-many-scroll-contexts-exception/384981/10 "2026-02-20T22:07:39Z")

</div>

Thank you all for replying and giving some pointer. I have just requested searh query from user community and some of them was not optimized. I provided them search\_after and PIT option.

Also started collecting stack monitoring for cluster. Also improvise smaller query by using get or mget API and/or use REST in place of sql.

Still lot to do. but seems like I am on right track. 🙂
