# Elasticsearch : cannot bulk index file larger than 6mb

**URL:** <https://discuss.elastic.co/t/elasticsearch-cannot-bulk-index-file-larger-than-6mb/94321>\
**Category:** Elasticsearch\
**Created:** [July 24, 2017, 11:51am UTC](https://discuss.elastic.co/t/elasticsearch-cannot-bulk-index-file-larger-than-6mb/94321 "2017-07-24T11:51:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saurab\_Dahal](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@Saurab\_Dahal](https://discuss.elastic.co/u/Saurab_Dahal)\
**Post date:** [July 24, 2017, 11:51am UTC](https://discuss.elastic.co/t/elasticsearch-cannot-bulk-index-file-larger-than-6mb/94321/1 "2017-07-24T11:51:53Z")

</div>

I want to index a contents of a file whose size is 20mb, but everytime I try to bulk import

`rest - curl: (56) Recv failure: Connection was reset`  
but if I split the file into smaller files like 5-6mb I can index without any error.I am really confused if this is a server problem or elasticsearch problem I have `http.max_content_length: 500mb` so, it shouldnot be a problem to index just 20mb. Here's the code

`curl -XPUT '<server-ip>:9200/bigmart/halfyear/_bulk' -H 'Content-Type: application/x-ndjson' --data-binary @week-1.json`  
my `java_heap is set to 2gb` . Previously on other server I had faced similar problem. In that case I could easily index 70mb file but I couldnot index \>100mb even though `http.max_content_length: 500mb`. So i chunked large files into 70mb file and indexed, but on this server I couldnot even index 20mb file. I am seriously confused.

---

<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:** [August 21, 2017, 11:52am UTC](https://discuss.elastic.co/t/elasticsearch-cannot-bulk-index-file-larger-than-6mb/94321/2 "2017-08-21T11:52:24Z")

</div>

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