# Impact of multiple concurrent scroll API on ElasticSearch

**URL:** <https://discuss.elastic.co/t/impact-of-multiple-concurrent-scroll-api-on-elasticsearch/206805>\
**Category:** Elasticsearch\
**Created:** [November 6, 2019, 2:09pm UTC](https://discuss.elastic.co/t/impact-of-multiple-concurrent-scroll-api-on-elasticsearch/206805 "2019-11-06T14:09:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![avinash9999](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avinash9999/32/91409_2.png) [@avinash9999](https://discuss.elastic.co/u/avinash9999)\
**Post date:** [November 6, 2019, 2:09pm UTC](https://discuss.elastic.co/t/impact-of-multiple-concurrent-scroll-api-on-elasticsearch/206805/1 "2019-11-06T14:09:34Z")

</div>

I am using a large number of search API( **using scroll = '1m'** ) to search documents from it

> Average no of requests per minute = 500  
> Average time of hit = 100 ms

**Sometimes when hits are at peak I started getting error**

> {"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}

Is it because of scroll timing ? or any other problem.  
Please Suggest !!

---

<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 12, 2019, 11:55am UTC](https://discuss.elastic.co/t/impact-of-multiple-concurrent-scroll-api-on-elasticsearch/206805/2 "2019-11-12T11:55:58Z")

</div>

Scrolls are expensive to run concurrently.  
For each scroll ID there is a unique point-in-time view of the current set of segments preserved for that scroll. This hangs on to files and related caches that would otherwise be removed by the [constant segment rewriting](http://blog.mikemccandless.com/2011/02/visualizing-lucenes-segment-merges.html) that happens while indexing is active. This is why it is especially resource-intensive to do concurrently.

---

<div class="post-metadata">

**Author:** ![avinash9999](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avinash9999/32/91409_2.png) [@avinash9999](https://discuss.elastic.co/u/avinash9999)\
**Post date:** [November 12, 2019, 12:01pm UTC](https://discuss.elastic.co/t/impact-of-multiple-concurrent-scroll-api-on-elasticsearch/206805/3 "2019-11-12T12:01:01Z")

</div>

Yeah Scroll reserves the resource for that particular time, that was the problem I solved it already.  
Anyways Thanks..

---

<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 10, 2019, 12:01pm UTC](https://discuss.elastic.co/t/impact-of-multiple-concurrent-scroll-api-on-elasticsearch/206805/4 "2019-12-10T12:01:05Z")

</div>

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