# How delete scroll\_id in elasticsearch-php api?

**URL:** https://discuss.elastic.co/t/how-delete-scroll-id-in-elasticsearch-php-api/208460
**Category:** Elasticsearch
**Created:** [November 19, 2019, 9:05am UTC](https://discuss.elastic.co/t/how-delete-scroll-id-in-elasticsearch-php-api/208460 "2019-11-19T09:05:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AndriyImp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andriyimp/32/57480_2.png) [@AndriyImp](https://discuss.elastic.co/u/AndriyImp)
#### Post date: [November 19, 2019, 9:05am UTC](https://discuss.elastic.co/t/how-delete-scroll-id-in-elasticsearch-php-api/208460/1 "2019-11-19T09:05:26Z")

</div>

Hi all!

can any know how to delete scroll\_id ?  
In my case i have toons of data, so in update process i delte doc (per 10), but after some count of records I got error:

```
{"error":{"root_cause":[{"type":"exception","reason":"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."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"enterprises","node":"Ak_cDKp2QGeOC2SA0Xnbug","reason":{"type":"exception","reason":"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."}}]},"status":500} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\ServerErrorResponseException(code: 500): {\"error\":{\"root_cause\":[{\"type\":\"exception\",\"reason\":\"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.\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"enterprises\",\"node\":\"Ak_cDKp2QGeOC2SA0Xnbug\",\"reason\":{\"type\":\"exception\",\"reason\":\"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.\"}}]},\"status\":500} at /home/angryalf/www/postly.be/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:660)

```

any ideas how to solve this?

Thanks!

---

<div class="post-metadata">

### Author: ![AndriyImp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andriyimp/32/57480_2.png) [@AndriyImp](https://discuss.elastic.co/u/AndriyImp)
#### Post date: [November 19, 2019, 9:12am UTC](https://discuss.elastic.co/t/how-delete-scroll-id-in-elasticsearch-php-api/208460/2 "2019-11-19T09:12:19Z")

</div>

Sorry, found solution for:

```
->clearScroll([
        'scroll_id' => $response['_scroll_id']
    ]);
```

---

<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 17, 2019, 9:12am UTC](https://discuss.elastic.co/t/how-delete-scroll-id-in-elasticsearch-php-api/208460/3 "2019-12-17T09:12:20Z")

</div>

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