bulk api 호출시 elasticsearch의 HTTP content length 길이 제한으로 인해 에러가 발생할 수 있다.

netty 제한 크기 때문에 그렇다. 


[WARN ][http.netty               ] [node_1] Caught exception while handling client http traffic, closing connection [id: 0x7160d228, /1.1.1.1:56212 => /1.2.2.2:9200]

org.elasticsearch.common.netty.handler.codec.frame.TooLongFrameException: HTTP content length exceeded 104857600 bytes.

at org.elasticsearch.common.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:169)




클라이언트에서는 그냥 아무 것도 리턴받지 않고 에러가 발생하기 때문에 알 수가 없다.


문제를 해결하려면 elasticsearch.yml 의 http 설정이 주석을 변경한다.


원래는 아래와 같은 설정이 있는데. 

# Set a custom allowed content length:

#

#http.max_content_length: 100mb


다음과 같이 수정할 수 있다.  주석만 풀어도 주석에 있는 값이 디폴트라서 문제가 된다.


# Set a custom allowed content length:

#

http.max_content_length: 200mb



Posted by '김용환'
,