spring-bootelasticsearchelastic-stackspring-data-elasticsearch

Is there any difference when applying http_max_content_length setting for elastic clusters for version 7.17.3 and 8.9.0?


I have two elastic clusters one with version 7.17.3 and the other with 8.9.0.

I was having an issue https://stackoverflow.com/questions/51020646/org-apache-http-contenttoolongexception-entity-content-is-too-long-105539255#:~:text=You%20need%20to%20increase%20the,a%20little%20higher%20than%20that.

to which the solution was to increase the cluster setting http_max_content_length.

I have increase it to 200mb on both the clusters.

Also I am using spring-data-elasticsearch 4.4.10, and the same code, but I still get the contenttoolongexception on the cluster with version 7.17.3 and not with 8.9.0.

I did not find anything in the docs about this. Can someone please help here.


Solution

  • The solution to this problem is in the approved answer here in the Update section.

    org.apache.http.ContentTooLongException: entity content is too long [105539255] for the configured buffer limit [104857600]

    I did override the buffer size and then it worked.

    Also, just an FYI that after doing this applications should undergo a stress testing as it has effect on the heap memory.