# Bulk insert not inserting

**URL:** <https://discuss.elastic.co/t/bulk-insert-not-inserting/82482>\
**Category:** Elasticsearch\
**Created:** [April 15, 2017, 7:06pm UTC](https://discuss.elastic.co/t/bulk-insert-not-inserting/82482 "2017-04-15T19:06:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![witchlightning](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/witchlightning/32/71962_2.png) [@witchlightning](https://discuss.elastic.co/u/witchlightning)\
**Post date:** [April 15, 2017, 7:06pm UTC](https://discuss.elastic.co/t/bulk-insert-not-inserting/82482/1 "2017-04-15T19:06:28Z")

</div>

I've been trying to insert a jsonl file into elastic search using:

`curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/ri/RiAll/_bulk?pretty' --data-binary @riall.jsonl`

The command doesn't throw an error but nothing gets imported. This is the response:

```
% Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 602M 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

```

A smaller file size works but I'm sure elasticsearch can take a 600mb file, I know lucene can. Do I need to configure the heap or something like that?

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [April 21, 2017, 10:10am UTC](https://discuss.elastic.co/t/bulk-insert-not-inserting/82482/2 "2017-04-21T10:10:20Z")

</div>

[`http.max_content_length`](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/modules-http.html#_settings_2) defaults to `100MB`, so your 600MB file is being rejected.

That said, the answer is not to increase the limit, but rather to break your file down into smaller (much smaller!) chunks. We usually recommend bulk requests in the 5-10MB range.

---

<div class="post-metadata">

**Author:** ![witchlightning](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/witchlightning/32/71962_2.png) [@witchlightning](https://discuss.elastic.co/u/witchlightning)\
**Post date:** [April 21, 2017, 1:13pm UTC](https://discuss.elastic.co/t/bulk-insert-not-inserting/82482/3 "2017-04-21T13:13:44Z")

</div>

Thanks. I did end up bumping up the max\_content\_length to 700mb and  
increasing the heap to 8gb. In my case it worked. That's probably because  
the documents are very short, a couple of sentences max.

Cheers,  
James  
my own book [http://myownbook.org](http://myownbook.org)

---

<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:** [May 19, 2017, 1:19pm UTC](https://discuss.elastic.co/t/bulk-insert-not-inserting/82482/4 "2017-05-19T13:19:05Z")

</div>

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