Request Entity Too Large Exception

I am getting below exception.

org.elasticsearch.client.ResponseException: PUT HTTP/1.1 413 Request Entity Too Large

I am pushing 200000 records to elasticsearch but getting above exception. Please provide suggestions.
I want to push bulk records to elasticsearch.

Send multiple smaller bulk requests, e.g. a few thousand records each. A good guideline is to try and keep the size of the bulk request below 5MB in size. This approach also has the benefit of putting your cluster under less pressure.

Breaking data into multiple small request is taking time. Means I have 1000000 records and I am breaking data into 10 request. Per request I am sending 100000 records to elasticsearch. But It is taking time to create new json objects and sending one after another.

Have you not scripted it so you easily can alter the size of the bulk requests so you can find the optimal size?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.