# ElasticSearch TASKS API - Task is given to a different node after 1 minute

**URL:** <https://discuss.elastic.co/t/elasticsearch-tasks-api-task-is-given-to-a-different-node-after-1-minute/318600>\
**Category:** Elasticsearch\
**Created:** [November 10, 2022, 1:22am UTC](https://discuss.elastic.co/t/elasticsearch-tasks-api-task-is-given-to-a-different-node-after-1-minute/318600 "2022-11-10T01:22:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vedalas21](https://avatars.discourse-cdn.com/v4/letter/v/a587f6/32.png) [@vedalas21](https://discuss.elastic.co/u/vedalas21)\
**Post date:** [November 10, 2022, 1:22am UTC](https://discuss.elastic.co/t/elasticsearch-tasks-api-task-is-given-to-a-different-node-after-1-minute/318600/1 "2022-11-10T01:22:19Z")

</div>

Hi Team,

I had a weird observation in our Elasticsearch Cluster. We have an ES Query that will be executed from a python script.

When the Query is being fired from python, right away a task will get created under `GET /_tasks` with a task id on NODE A

The query runs about 3 to 4 minutes to fetch the results. Meanwhile, for every minute the task id changes and runs over a different node(NODE B, NODE C, NODE E, etc.,)

There are no other queries running in the cluster. Still, After a minute the same query will be given to a different node.

I wanted to analyze the **total time taken for query execution with out enabling slow logs**. This is the primary reason we have chosen `GET /_tasks` API

I am stuck here on my analysis part. Any help would be really appreciated

---

<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:** [November 15, 2022, 12:20am UTC](https://discuss.elastic.co/t/elasticsearch-tasks-api-task-is-given-to-a-different-node-after-1-minute/318600/2 "2022-11-15T00:20:20Z")

</div>

Welcome to our community! 😃

Are you able to share the output you are seeing?

---

<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 13, 2022, 12:21am UTC](https://discuss.elastic.co/t/elasticsearch-tasks-api-task-is-given-to-a-different-node-after-1-minute/318600/3 "2022-12-13T00:21:18Z")

</div>

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