# How can I send large JSON file (6 GB) to Elasticsearch using bulk API?

**URL:** <https://discuss.elastic.co/t/how-can-i-send-large-json-file-6-gb-to-elasticsearch-using-bulk-api/228712>\
**Category:** Elasticsearch\
**Created:** [April 19, 2020, 8:30am UTC](https://discuss.elastic.co/t/how-can-i-send-large-json-file-6-gb-to-elasticsearch-using-bulk-api/228712 "2020-04-19T08:30:14Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![cezar996](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@cezar996](https://discuss.elastic.co/u/cezar996)\
**Post date:** [April 20, 2020, 8:04am UTC](https://discuss.elastic.co/t/how-can-i-send-large-json-file-6-gb-to-elasticsearch-using-bulk-api/228712/5 "2020-04-20T08:04:09Z")

</div>

Finally, I have succeeded in sending the whole JSON file to Elasticsearch, using Logstash. There was no need to split the file in chunks. I thank a lot to the guys in the post [discuss.elastic.co](https://discuss.elastic.co/t/json-parsing-question-elasticsearch-kibana-logstash-6-5/163255) which inspired me very much. The logs they had are very similar with mines. This way, I want to post here my config. file in order to help other people which may have similar problems like me:

```
input {
  file {
    path => ["/home/...../file.json"]
    start_position => "beginning"
    sincedb_path => ["/home/...../sincedb"]
    codec => "json"
  }
}

filter {
 mutate {
  rename => { "_id" => "idoriginal" }
  rename => { "_index" => "indexoriginal" }
  rename => { "_type" => "typeoriginal" }
  rename => { "_source" => "sourceoriginal" }
 }
}

output {
  elasticsearch {
    hosts => ["http://localhost:9200"]
    index => "jsonlogs-%{+YYYY.MM.dd}"
  }
  
  stdout {
	codec => rubydebug
  }
}

```

If it happens at some time after you started Logstash to have more than 90% of disk full (because of the large data you are sending to Elasticsearch), having the error like here [discuss.elastic.co](https://discuss.elastic.co/t/retrying-individual-bulk-actions-that-failed-or-were-rejected-by-the-previous-bulk-request/138419/9), you have to go in `Dev Tools/Console` and execute the code below:

```
PUT /jsonlogs-2020.04.20(in fact, your index name)/_settings
{
"index.blocks.read_only_allow_delete": null
}

```

Hope it will be useful for all the people who had or will have similar problems like me. Best wishes!

---

_[View the full topic](https://discuss.elastic.co/t/how-can-i-send-large-json-file-6-gb-to-elasticsearch-using-bulk-api/228712)._
