# Exception in indexing function: ElasticsearchException got in indexing function: TransportError

**URL:** https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220
**Category:** Elasticsearch
**Created:** [April 26, 2021, 6:09am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220 "2021-04-26T06:09:50Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![sanjaysh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sanjaysh/32/79183_2.png) [@sanjaysh](https://discuss.elastic.co/u/sanjaysh)
#### Post date: [April 26, 2021, 6:09am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/1 "2021-04-26T06:09:51Z")

</div>

Hello All,  
I was ingesting the data into the ElasticCloud and suddenly I got this error before the competition of the data I was having the data of 14BG and at 13.5 GB data are being completed but this error has come and it got stopped now.

`[17:15:47]{completed_searching2.py:346}ERROR- Error Occured: Exception in indexing function: ElasticsearchException got in indexing function: TransportError(429, 'circuit_breaking_exception', '[parent] Data too large, data for [<http_request>] would be [419990290/400.5mb], which is larger than the limit of [410412646/391.3mb], real usage: [419976320/400.5mb], new bytes reserved: [13970/13.6kb], usages [request=17232/16.8kb, fielddata=21250/20.7kb, in_flight_requests=13970/13.6kb, model_inference=0/0b, accounting=779820/761.5kb]')`

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 27, 2021, 1:04am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/2 "2021-04-27T01:04:14Z")

</div>

How are you ingesting the data into Elasticsearch?

---

<div class="post-metadata">

### Author: ![sanjaysh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sanjaysh/32/79183_2.png) [@sanjaysh](https://discuss.elastic.co/u/sanjaysh)
#### Post date: [April 27, 2021, 1:16pm UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/3 "2021-04-27T13:16:29Z")

</div>

I have made a script using this script I was ingesting to the elastic cloud and before completion, I got this error and unable to find the solution can you please help me to have the solution for this error.  
data was around 14BG and 13.5 GB are completed and now it is stopped.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 27, 2021, 11:53pm UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/4 "2021-04-27T23:53:19Z")

</div>

What language is the script? Are you using an Elasticsearch client? Are you using `_bulk`?

---

<div class="post-metadata">

### Author: ![sanjaysh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sanjaysh/32/79183_2.png) [@sanjaysh](https://discuss.elastic.co/u/sanjaysh)
#### Post date: [April 28, 2021, 6:56am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/5 "2021-04-28T06:56:05Z")

</div>

I am using python language for script

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 28, 2021, 11:55pm UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/6 "2021-04-28T23:55:29Z")

</div>

> [@warkolm](#):
>
> Are you using an Elasticsearch client? Are you using `_bulk` ?

This is important too.

---

<div class="post-metadata">

### Author: ![sanjaysh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sanjaysh/32/79183_2.png) [@sanjaysh](https://discuss.elastic.co/u/sanjaysh)
#### Post date: [April 29, 2021, 6:34am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/7 "2021-04-29T06:34:45Z")

</div>

I think no  
but how will I know it is `_bulk`

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 29, 2021, 6:40am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/8 "2021-04-29T06:40:18Z")

</div>

Because you will be calling the bulk API end point. Which it doesn't sound like you are, which is not ideal.

---

<div class="post-metadata">

### Author: ![sanjaysh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sanjaysh/32/79183_2.png) [@sanjaysh](https://discuss.elastic.co/u/sanjaysh)
#### Post date: [April 29, 2021, 7:50am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/9 "2021-04-29T07:50:02Z")

</div>

please tell me how can I resolve it?

---

<div class="post-metadata">

### Author: ![sanjaysh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sanjaysh/32/79183_2.png) [@sanjaysh](https://discuss.elastic.co/u/sanjaysh)
#### Post date: [April 29, 2021, 7:52am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/10 "2021-04-29T07:52:22Z")

</div>

if that was the problem so why 13.5 GB of data are ingested successfully and why only remaining 500 MB data does not and why right now i am getting this issue.  
never mind of my question i am very curious and love to learn so to get to know i am asking i hope i will have answer from you  
Thank you

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 29, 2021, 8:15am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/11 "2021-04-29T08:15:52Z")

</div>

> [@sanjaysh](#):
>
> 'circuit\_breaking\_exception', '[parent] Data too large, data for [\<http\_request\>] would be [419990290/400.5mb], which is larger than the limit of [410412646/391.3mb]

Basically you are sending too much data to Elasticsearch.

Using bulk reduces the overhead when talking to Elasticsearch for indexing. Which should minimise this.

---

<div class="post-metadata">

### Author: ![sanjaysh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sanjaysh/32/79183_2.png) [@sanjaysh](https://discuss.elastic.co/u/sanjaysh)
#### Post date: [April 29, 2021, 1:18pm UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/12 "2021-04-29T13:18:58Z")

</div>

so basically doc size is very big you mean right?  
so after getting this error can I reingest again to it because it Is on production and client will need to work on it and I have very little time so tell me, sir  
can I reingest and will I not lose all data?

Thank you

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 30, 2021, 2:49am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/13 "2021-04-30T02:49:02Z")

</div>

> [@sanjaysh](#):
>
> so basically doc size is very big you mean right?

Potentially.

---

<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: [April 30, 2021, 6:43am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/14 "2021-04-30T06:43:27Z")

</div>

I can see that you opened the same question twice ([ElasticsearchException got in indexing function: TransportError - #3 by sanjaysh](https://discuss.elastic.co/t/elasticsearchexception-got-in-indexing-function-transporterror/271195/3)) and that you are also asking me privately.

Let's keep the conversation in one single place. Let say here.

---

<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: [April 30, 2021, 6:46am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/15 "2021-04-30T06:46:27Z")

</div>

From the code I have seen, you are using single index request per line of CSV which is inefficient but I'm suspecting something else here. What is the HEAP size? Could you share the full elasticsearch logs please?

It could have been easier to use Logstash or filebeat by the way to import your data in elasticsearch.

---

<div class="post-metadata">

### Author: ![sanjaysh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sanjaysh/32/79183_2.png) [@sanjaysh](https://discuss.elastic.co/u/sanjaysh)
#### Post date: [April 30, 2021, 8:14am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/16 "2021-04-30T08:14:57Z")

</div>

Sorry, But I really don't know about the HEAP size.  
The file has millions of rows all data pasting here is not possible. I hope you can understand. But I am giving the last few lines of the log file. I hope it will help you to understand the error. And I will hope to have the solution from you, sir...

```
[17:14:59]{/home/atul/Import-To-ES/.be/lib/python3.6/site-packages/elasticsearch/connection/base.py:121}INFO- POST https://7a3c250340134b0fbc4d4d22d1d23be9.us-west1.gcp.cloud.es.io:9243/ccgp1/_doc/1902f4f3ed91842c0cd35d65d67047a2b2166fda [status:201 request:2.216s]

[17:14:59]{completed_searching2.py:307}INFO- created

[17:15:07]{/home/atul/Import-To-ES/.be/lib/python3.6/site-packages/elasticsearch/connection/base.py:121}INFO- POST https://7a3c250340134b0fbc4d4d22d1d23be9.us-west1.gcp.cloud.es.io:9243/ccgp1/_doc/0a7041bd2674041636c6d5cfd88da4a72fd96034 [status:201 request:4.101s]

[17:15:07]{completed_searching2.py:307}INFO- created

[17:15:13]{/home/atul/Import-To-ES/.be/lib/python3.6/site-packages/elasticsearch/connection/base.py:121}INFO- POST https://7a3c250340134b0fbc4d4d22d1d23be9.us-west1.gcp.cloud.es.io:9243/ccgp1/_doc/3acb1f3607684a44b0233c2c26b30501c0048d2b [status:201 request:2.505s]

[17:15:13]{completed_searching2.py:307}INFO- created

[17:15:20]{/home/atul/Import-To-ES/.be/lib/python3.6/site-packages/elasticsearch/connection/base.py:121}INFO- POST https://7a3c250340134b0fbc4d4d22d1d23be9.us-west1.gcp.cloud.es.io:9243/ccgp1/_doc/09f60ebb86a57345a3eaeabab5cdb466549498f4 [status:201 request:2.701s]

[17:15:20]{completed_searching2.py:307}INFO- created

[17:15:28]{/home/atul/Import-To-ES/.be/lib/python3.6/site-packages/elasticsearch/connection/base.py:121}INFO- POST https://7a3c250340134b0fbc4d4d22d1d23be9.us-west1.gcp.cloud.es.io:9243/ccgp1/_doc/fae1aee43334ee9b1cfc6ba58aa86429fc3b80f9 [status:201 request:4.677s]

[17:15:28]{completed_searching2.py:307}INFO- created

[17:15:40]{/home/atul/Import-To-ES/.be/lib/python3.6/site-packages/elasticsearch/connection/base.py:121}INFO- POST https://7a3c250340134b0fbc4d4d22d1d23be9.us-west1.gcp.cloud.es.io:9243/ccgp1/_doc/5296f2495b460d8a957ab5724b3ed41d40b33003 [status:201 request:4.412s]

[17:15:40]{completed_searching2.py:307}INFO- created

[17:15:47]{/home/atul/Import-To-ES/.be/lib/python3.6/site-packages/elasticsearch/connection/base.py:149}WARNING- POST https://7a3c250340134b0fbc4d4d22d1d23be9.us-west1.gcp.cloud.es.io:9243/ccgp1/_doc/acc585c05d1f05cf89898517d04b83a4c732318a [status:429 request:0.023s]

[17:15:47]{completed_searching2.py:346}ERROR- Error Occured: Exception in indexing function: ElasticsearchException got in indexing function: TransportError(429, 'circuit_breaking_exception', '[parent] Data too large, data for [<http_request>] would be [419990290/400.5mb], which is larger than the limit of [410412646/391.3mb], real usage: [419976320/400.5mb], new bytes reserved: [13970/13.6kb], usages [request=17232/16.8kb, fielddata=21250/20.7kb, in_flight_requests=13970/13.6kb, model_inference=0/0b, accounting=779820/761.5kb]')
```

---

<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: [April 30, 2021, 8:17am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/17 "2021-04-30T08:17:42Z")

</div>

> [@sanjaysh](#):
>
> But I really don't know about the HEAP size.

So could you share the full elasticsearch logs please as I asked previously?

---

<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: [April 30, 2021, 8:18am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/18 "2021-04-30T08:18:21Z")

</div>

> [@sanjaysh](#):
>
> The file has millions of rows all data pasting here is not possible.

A single line would be enough. But that's probably not the problem here.

---

<div class="post-metadata">

### Author: ![sanjaysh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sanjaysh/32/79183_2.png) [@sanjaysh](https://discuss.elastic.co/u/sanjaysh)
#### Post date: [April 30, 2021, 8:55am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/19 "2021-04-30T08:55:09Z")

</div>

But here I am not looking for the option for sharing the file. So should I copy and paste here???

---

<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: [April 30, 2021, 9:11am UTC](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220/20 "2021-04-30T09:11:30Z")

</div>

Copy/paste and format as you did previously.  
If it does not fit on the forum, upload to [gist.github.com](http://gist.github.com) and paste the link here.

[Next page](https://discuss.elastic.co/t/exception-in-indexing-function-elasticsearchexception-got-in-indexing-function-transporterror/271220.md?page=2)
