简体   繁体   English

Elasticsearch大批量上传查询

[英]Elasticsearch Large Bulk Upload Query

I'm getting an error trying to upload a json file using Elasticsearch api but I keep getting this error: 我在尝试使用Elasticsearch api上传json文件时遇到错误,但我一直收到此错误:

 Caught exception while handling client http traffic, closing connection [id: 0x0d08b235, /172.17.0.1:33780 => /172.17.0.2:9200]
org.jboss.netty.handler.codec.frame.TooLongFrameException: HTTP content length exceeded 104857600 bytes.
    at org.jboss.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:169)
    at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)

Is there a way to chunk this easily? 有没有一种方法可以轻松地分块?

You'd need to increase the http.max_content_length value to something greater than the default (100MB): https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html 您需要将http.max_content_length值增加到大于默认值(100MB)的值: https : http.max_content_length

BUT you need to be careful with these values and not increase them too much. 但是您需要小心使用这些值,而不要增加太多。 The bulk operations that arrive at a node will be held temporarily in a queue (if there are too many of them at the same time) in a memory buffer before being split and sent to the appropriate nodes for further processing. 到达节点的批量操作将被暂时保留在队列中(如果同时存在太多)在内存缓冲区中的队列中,然后将其拆分并发送到适当的节点进行进一步处理。 So, if you have too many concurrent bulk operations and these are large enough they could use a lot of memory. 因此,如果您有太多的并发批量操作并且这些操作足够大,那么它们可能会占用大量内存。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM