01 September 2020

Elastic check timeout Task

 Sometime task take a very long time to complete such as reindex a big index. This will cause a timeout.

Actually the task is not terminate, but still continue on the background. How to check/list these background process?


1) list all tasks

GET _tasks?actions=indices*reindex
{
"query": {
"match_all": {}
   }
}

This will result such as this:

      "tasks" : {
        "kxXru-l2R92uy63iVzUYww:2365783289" : {
          "node" : "kxXru-l2R92uy63iVzUYww",
          "id" : 2365783289,
          "type" : "transport",
          "action" : "indices:data/write/reindex",
          "start_time_in_millis" : 1598930492885,
          "running_time_in_nanos" : 35909231518,
          "cancellable" : true,
          "headers" : { }
        }
      }


2) see details task
GET _tasks/kxXru-l2R92uy63iVzUYww:2365783289
  "query": {
    "match_all": {}
  }
}

This will resulted:
{
  "completed" : false,
  "task" : {
    "node" : "kxXru-l2R92uy63iVzUYww",
    "id" : 2365783289,
    "type" : "transport",
    "action" : "indices:data/write/reindex",
    "status" : {
      "total" : 346450,
      "updated" : 0,
      "created" : 262000,
      "deleted" : 0,
      "batches" : 263,
      "version_conflicts" : 0,
      "noops" : 0,
      "retries" : {
        "bulk" : 0,
        "search" : 0
      },
      "throttled_millis" : 0,
      "requests_per_second" : -1.0,
      "throttled_until_millis" : 0
    },
    "description" : "reindex from [my-event-b086cd38-fde3-4d0b-8403-154942d42a9f-2020-07-*] to [my-event-b086cd38-fde3-4d0b-8403-154942d42a9f-2020-07][_doc]",
    "start_time_in_millis" : 1598930492885,
    "running_time_in_nanos" : 261954757922,
    "cancellable" : true,
    "headers" : { }
  }
}

No comments:

Post a Comment

Terima kasih