Source: socprime.com – Author: Oleh P.
I had a problem with long-running stuck tasks. These tasks were stuck due to various reasons, such as resource constraints, bugs, or other issues.
How I resolved it:
I followed these steps:
1) You need to identify the stuck tasks by using the command below
GET _cat/tasks?v&h=id,ip,action,type,task_id,timestamp,running_time
When you use the above command, you will get lists of all long-running stuck tasks:
2) If you want or need to get details for a long-running stuck task, use this command:
GET _tasks?actions=*/&detailed
When you use the above command, you will get all the details of the chosen task:
3) To cancel the long-running tasks, use this command:
POST /_tasks//_cancel
If all is finished successfully, you will get:
4) Rarely it could be impossible to cancel a task. In this case, you need to clear the stuck task by restarting the node.
First, identify the node where the task is running using the output from
GET /_cat/tasks?format=json
Then, restart the nodes where the task is running.
Was this article helpful?
Like and share it with your peers.
Related Posts
Original Post URL: https://socprime.com/blog/how-to-check-what-task-is-stuck-and-cancel-it-on-dev-tools/
Category & Tags: Blog,Knowledge Bits,SIEM – Blog,Knowledge Bits,SIEM
Views: 2