# Max doc size for indexing over HTTP

**URL:** <https://discuss.elastic.co/t/max-doc-size-for-indexing-over-http/17953>\
**Category:** Elasticsearch\
**Created:** [June 6, 2014, 12:49pm UTC](https://discuss.elastic.co/t/max-doc-size-for-indexing-over-http/17953 "2014-06-06T12:49:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ed\_perez](https://avatars.discourse-cdn.com/v4/letter/e/9de053/32.png) [@ed\_perez](https://discuss.elastic.co/u/ed_perez)\
**Post date:** [June 6, 2014, 12:49pm UTC](https://discuss.elastic.co/t/max-doc-size-for-indexing-over-http/17953/1 "2014-06-06T12:49:40Z")

</div>

I'm trying to index a document over 1gb in size but I get the following  
error.

org.elasticsearch.common.netty.handler.codec.frame.TooLongFrameException:  
HTTP content length exceeded 1073741824 bytes.  
1073741824 = 1gb

My elasticsearch .yml has http.max\_content\_length set to 1900mb. I found  
this post that says Netty has a 2gb limit (  
[https://github.com/elasticsearch/elasticsearch/issues/2237](https://github.com/elasticsearch/elasticsearch/issues/2237) ) so I was  
expecting to be able to index documents of approximately 2gb. Does  
elasticsearch impose a limit of 1gb even though I specified \>1gb? If not,  
I can file an issue on github.

This is my node info

{  
"status" : 200,  
"name" : "SOURCEONE-elastic-ubuntu-4",  
"version" : {  
"number" : "1.2.0",  
"build\_hash" : "c82387f290c21505f781c695f365d0ef4098b272",  
"build\_timestamp" : "2014-05-22T12:49:13Z",  
"build\_snapshot" : false,  
"lucene\_version" : "4.8"  
},  
"tagline" : "You Know, for Search"  
}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e32e66f9-0e96-49d0-b3d5-c9c35cd8d10d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e32e66f9-0e96-49d0-b3d5-c9c35cd8d10d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 6, 2014, 1:26pm UTC](https://discuss.elastic.co/t/max-doc-size-for-indexing-over-http/17953/2 "2014-06-06T13:26:48Z")

</div>

1gb is a very large document and it is unusual to index such sizes.

There is a limit check against the heap. In order to be able to process  
such length, you need a large heap alone to store the document source.  
Depending on analyzer, heap demand increases even more.

You can index documents of arbitrary length if you preprocess them first  
and split them into smaller chunks.

Jörg

On Fri, Jun 6, 2014 at 2:49 PM, eperezks [perez.ed@gmail.com](mailto:perez.ed@gmail.com) wrote:

> I'm trying to index a document over 1gb in size but I get the following  
> error.
> 
> org.elasticsearch.common.netty.handler.codec.frame.TooLongFrameException:  
> HTTP content length exceeded 1073741824 bytes.  
> 1073741824 = 1gb
> 
> My elasticsearch .yml has http.max\_content\_length set to 1900mb. I found  
> this post that says Netty has a 2gb limit (  
> [Document maximum size for bulk indexing over HTTP · Issue #2237 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/2237) ) so I was  
> expecting to be able to index documents of approximately 2gb. Does  
> elasticsearch impose a limit of 1gb even though I specified \>1gb? If not,  
> I can file an issue on github.
> 
> This is my node info
> 
> {  
> "status" : 200,  
> "name" : "SOURCEONE-elastic-ubuntu-4",  
> "version" : {  
> "number" : "1.2.0",  
> "build\_hash" : "c82387f290c21505f781c695f365d0ef4098b272",  
> "build\_timestamp" : "2014-05-22T12:49:13Z",  
> "build\_snapshot" : false,  
> "lucene\_version" : "4.8"  
> },  
> "tagline" : "You Know, for Search"  
> }
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/e32e66f9-0e96-49d0-b3d5-c9c35cd8d10d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e32e66f9-0e96-49d0-b3d5-c9c35cd8d10d%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/e32e66f9-0e96-49d0-b3d5-c9c35cd8d10d%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e32e66f9-0e96-49d0-b3d5-c9c35cd8d10d%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoENg2gujZ01Gk-P6uDHBh5QffdQLB7fEgRJUUqdqeO4oQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoENg2gujZ01Gk-P6uDHBh5QffdQLB7fEgRJUUqdqeO4oQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:24am UTC](https://discuss.elastic.co/t/max-doc-size-for-indexing-over-http/17953/3 "2017-07-06T01:24:10Z")

</div>


