# Sending data to elasticsearch with json file using CURL, meet records number limitation

**URL:** <https://discuss.elastic.co/t/sending-data-to-elasticsearch-with-json-file-using-curl-meet-records-number-limitation/106789>\
**Category:** Elasticsearch\
**Created:** [November 8, 2017, 3:38am UTC](https://discuss.elastic.co/t/sending-data-to-elasticsearch-with-json-file-using-curl-meet-records-number-limitation/106789 "2017-11-08T03:38:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![permanz](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@permanz](https://discuss.elastic.co/u/permanz)\
**Post date:** [November 8, 2017, 3:38am UTC](https://discuss.elastic.co/t/sending-data-to-elasticsearch-with-json-file-using-curl-meet-records-number-limitation/106789/1 "2017-11-08T03:38:26Z")

</div>

Hi All,

I want to using json file to send data to elasticsearch with curl, but got problem with limited records number in json file.

Elasticsearch version: 5.6.2, Memory: 16G, Single node with 5 shards.

using: curl -XPOST '[http://192.168.20.1:9200/my\_index/\_bulk?pretty](http://192.168.20.1:9200/my_index/_bulk?pretty)' --data-binary @test3.json

the result is ok, and test3.json file contains 3 reocrds, the file size is 1KB.

using: curl -XPOST '[http://192.168.20.1:9200/my\_index/\_bulk?pretty](http://192.168.20.1:9200/my_index/_bulk?pretty)' --data-binary @test4.json

the result is error, detail information as below, test4.json file contains 4 records, the file size is .1.3KB.

Some possible problems are:

- Missing or unknown request method.

- Missing URL.

- Missing HTTP Identifier (HTTP/1.0).

- Request is too large.

- Content-Length missing for POST or PUT requests.

- Illegal character in hostname; underscores are not allowed.

- HTTP/1.1 Expect: feature is being asked from an HTTP/1.0 software.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 8, 2017, 6:29am UTC](https://discuss.elastic.co/t/sending-data-to-elasticsearch-with-json-file-using-curl-meet-records-number-limitation/106789/2 "2017-11-08T06:29:19Z")

</div>

What is the log? What is the exact message?

---

<div class="post-metadata">

**Author:** ![1verse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/1verse/32/79603_2.png) [@1verse](https://discuss.elastic.co/u/1verse)\
**Post date:** [November 24, 2017, 10:18am UTC](https://discuss.elastic.co/t/sending-data-to-elasticsearch-with-json-file-using-curl-meet-records-number-limitation/106789/3 "2017-11-24T10:18:51Z")

</div>

Had similar issue. If you are using proxy, try disabling proxy, which worked for me.

---

<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:** [December 22, 2017, 10:19am UTC](https://discuss.elastic.co/t/sending-data-to-elasticsearch-with-json-file-using-curl-meet-records-number-limitation/106789/4 "2017-12-22T10:19:00Z")

</div>

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