I am trying to sync 1 million record to ES, and I am doing it using bulk API in batch of 2k. But after inserting around 25k-32k, elastic search is giving following exception.
Unable to parse response body: org.elasticsearch.ElasticsearchStatusException
ElasticsearchStatusException[Unable to parse response body]; nested: ResponseException[method [POST], host [**********], URI [/_bulk?timeout=1m], status line [HTTP/1.1 403 Request throttled due to too many requests]
403 Request throttled due to too many requests /_bulk]; nested: ResponseException[method [POST], host [************], URI [/_bulk?timeout=1m], status line [HTTP/1.1 403 Request throttled due to too many requests]
403 Request throttled due to too many requests /_bulk];
I am using aws elastic search. I think, I need to implement wait strategy to handle it, something like keep checking es status and call bulk insert if status all of ES okay. But not sure how to implement it? Does ES offers anything pre-build for it? Or Anything better way to handle this?
Thanks in advance.
Update: I am using AWS elastic search version 6.8