# Bulk API to Elastic Cloud write: connection reset by peer

**URL:** <https://discuss.elastic.co/t/bulk-api-to-elastic-cloud-write-connection-reset-by-peer/184304>\
**Category:** Elasticsearch\
**Created:** [June 5, 2019, 8:15am UTC](https://discuss.elastic.co/t/bulk-api-to-elastic-cloud-write-connection-reset-by-peer/184304 "2019-06-05T08:15:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![werowe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/werowe/32/47523_2.png) [@werowe](https://discuss.elastic.co/u/werowe)\
**Post date:** [June 5, 2019, 8:15am UTC](https://discuss.elastic.co/t/bulk-api-to-elastic-cloud-write-connection-reset-by-peer/184304/1 "2019-06-05T08:15:09Z")

</div>

I am trying to bulk load to elastic cloud and get connection reset by peer error. Looks like it is getting trying to write back to my server using a 10.\* IP address. I'm not supposed to log into the command line shell on the cloud instance I believe but access it from localhost shell.

If I try to run it on my local server it says

> 413 Request Entity Too Large
> # 413 Request Entity Too Large
> 
> * * *
> nginx/1.10.3 (Ubuntu)

> curl --user $pwd -H 'Content-Type: application/x-ndjson' -XPOST '[https://58571402f5464923883e7be42a037917.eu-central-1.aws.cloud.es.io:9243/0/\_bulk?pretty](https://58571402f5464923883e7be42a037917.eu-central-1.aws.cloud.es.io:9243/0/_bulk?pretty)' --data-binary @drug-event-0004-of-0004.json

**Post [https://10.11.131.72:18241/0/\_bulk?pretty:](https://10.11.131.72:18241/0/_bulk?pretty:) net/http: HTTP/1.x transport connection broken: write tcp 172.17.0.2:51240-\>10.11.131.72:18241: write: connection reset by peer**

---

<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:** [June 5, 2019, 8:30am UTC](https://discuss.elastic.co/t/bulk-api-to-elastic-cloud-write-connection-reset-by-peer/184304/2 "2019-06-05T08:30:41Z")

</div>

How big is your json file?

---

<div class="post-metadata">

**Author:** ![werowe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/werowe/32/47523_2.png) [@werowe](https://discuss.elastic.co/u/werowe)\
**Post date:** [June 5, 2019, 8:32am UTC](https://discuss.elastic.co/t/bulk-api-to-elastic-cloud-write-connection-reset-by-peer/184304/3 "2019-06-05T08:32:26Z")

</div>

637M

If that's too big can I bulk load the zip file?

---

<div class="post-metadata">

**Author:** ![werowe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/werowe/32/47523_2.png) [@werowe](https://discuss.elastic.co/u/werowe)\
**Post date:** [June 5, 2019, 8:33am UTC](https://discuss.elastic.co/t/bulk-api-to-elastic-cloud-write-connection-reset-by-peer/184304/4 "2019-06-05T08:33:55Z")

</div>

The cluster is large (see image)

 ![17](https://us1.discourse-cdn.com/elastic/original/3X/5/d/5de0aa8bb714a5bb41d25a130158af657ece3b6f.png)

---

<div class="post-metadata">

**Author:** ![werowe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/werowe/32/47523_2.png) [@werowe](https://discuss.elastic.co/u/werowe)\
**Post date:** [June 5, 2019, 8:40am UTC](https://discuss.elastic.co/t/bulk-api-to-elastic-cloud-write-connection-reset-by-peer/184304/5 "2019-06-05T08:40:21Z")

</div>

file is there if anyone else using elastic cloud wants to try [https://download.open.fda.gov/drug/event/all\_other/drug-event-0004-of-0004.json.zip](https://download.open.fda.gov/drug/event/all_other/drug-event-0004-of-0004.json.zip)

---

<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:** [June 5, 2019, 8:49am UTC](https://discuss.elastic.co/t/bulk-api-to-elastic-cloud-write-connection-reset-by-peer/184304/6 "2019-06-05T08:49:38Z")

</div>

Http limit is 100mb iirc so yes split into multiple bulks.  
I'd do something like 10mb at a time and try to decrease or increase.

---

<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 3, 2019, 8:49am UTC](https://discuss.elastic.co/t/bulk-api-to-elastic-cloud-write-connection-reset-by-peer/184304/7 "2019-07-03T08:49:40Z")

</div>

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