ElasticSearch TASKS API - Task is given to a different client node after 1 minute of execution

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

IMO the most likely explanation is that your Python script is aborting and retrying the search every minute. There is no mechanism within ES that would move an ongoing search task to a different node.

Thank you @DavidTurner for responding. Will check with DEV and get back to you!

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