# Elasticsearch-py automatic cancelling

**URL:** <https://discuss.elastic.co/t/elasticsearch-py-automatic-cancelling/162247>\
**Category:** Elasticsearch\
**Created:** [December 27, 2018, 2:31pm UTC](https://discuss.elastic.co/t/elasticsearch-py-automatic-cancelling/162247 "2018-12-27T14:31:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![raxawageme](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@raxawageme](https://discuss.elastic.co/u/raxawageme)\
**Post date:** [December 27, 2018, 2:31pm UTC](https://discuss.elastic.co/t/elasticsearch-py-automatic-cancelling/162247/1 "2018-12-27T14:31:34Z")

</div>

Hello, there.

I'm making some automated requests using elasticsearch-py. Those requests take some times but after a while (around 30 minutes) the search task doesn't exist anymore, while the same query using Kibana's console, complete in a less time (maybe because the data it's "fresh").

Running the same script again (with elasticsearch-py) we can get the same data from Kibana, in other words, we can only succesfully gets data only after running the query on Kibana.

Can anyone give me any suggestions how to solve this or why this is happening, please?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 28, 2018, 1:07am UTC](https://discuss.elastic.co/t/elasticsearch-py-automatic-cancelling/162247/2 "2018-12-28T01:07:49Z")

</div>

> [@raxawageme](#):
>
> Those requests take some times but after a while (around 30 minutes) the search task doesn't exist anymore

What do you mean by this?

---

<div class="post-metadata">

**Author:** ![raxawageme](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@raxawageme](https://discuss.elastic.co/u/raxawageme)\
**Post date:** [December 28, 2018, 11:33am UTC](https://discuss.elastic.co/t/elasticsearch-py-automatic-cancelling/162247/3 "2018-12-28T11:33:10Z")

</div>

That I'm looking at `_tasks?actions=indices:data/read/search` and after a while there isn't a search task anymore and have not received the search data.

---

<div class="post-metadata">

**Author:** ![raxawageme](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@raxawageme](https://discuss.elastic.co/u/raxawageme)\
**Post date:** [December 28, 2018, 1:33pm UTC](https://discuss.elastic.co/t/elasticsearch-py-automatic-cancelling/162247/4 "2018-12-28T13:33:35Z")

</div>

meanwhile, I've mitigated on the script to do the same query again and until now it's returning data. I think there is nothing to do with Kibana but with ES, since on the second search, with the same query, returns the search data

---

<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:** [January 25, 2019, 1:33pm UTC](https://discuss.elastic.co/t/elasticsearch-py-automatic-cancelling/162247/5 "2019-01-25T13:33:37Z")

</div>

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