Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 420
S S Avatar asked Aug 15 '18 04:08

S S


People also ask

How long does it take to reindex Elasticsearch?

Reindexing takes around 2 hours to complete.

What is Reindexing in Elasticsearch?

Reindex is the concept of copying existing data from a source index to a destination index which can be inside the same or a different cluster. Elasticsearch has a dedicated endpoint _reindex for this purpose. A reindexing is mostly required for updating mapping or settings.


1 Answers

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>
like image 175
Val Avatar answered Sep 20 '22 05:09

Val