Search code examples
elasticsearchkibana

Elasticsearch reindex error - client request timeout


I am trying to reindex using following line:

POST _reindex
{
  "source": {
    "index": "poi_201705"
  },
  "dest": {
    "index": "poi_dev_2"
  }
}

But I am getting following error in kibana console:

{
  "statusCode": 504,
  "error": "Gateway Time-out",
  "message": "Client request timeout"
}

Can anybody tell me what is this issue and how can get rid of it.


Solution

  • 504 simply means that the request is still running but the HTTP connection from Kibana to ES timed out.

    You can still see the request going on by using the task management API like this:

    GET _tasks?actions=*reindex&detailed
    

    If you want to run the task asynchronously you can also do it with the following command:

    POST _reindex?wait_for_completion=false
    

    This will return a task id whose progress can then be checked with:

    GET _tasks/<task-id>