# Elasticsearch 7.9.3 on Mac dies when inserting documents fast

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-9-3-on-mac-dies-when-inserting-documents-fast/254809>\
**Category:** Elasticsearch\
**Created:** [November 9, 2020, 6:20pm UTC](https://discuss.elastic.co/t/elasticsearch-7-9-3-on-mac-dies-when-inserting-documents-fast/254809 "2020-11-09T18:20:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toontje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toontje/32/16100_2.png) [@Toontje](https://discuss.elastic.co/u/Toontje)\
**Post date:** [November 9, 2020, 6:20pm UTC](https://discuss.elastic.co/t/elasticsearch-7-9-3-on-mac-dies-when-inserting-documents-fast/254809/1 "2020-11-09T18:20:04Z")

</div>

I use node-red to transform an existing JSON document and insert individual small JSON document using the POST command. Apparently i do this too fast because after a few seconds port 9200 stops responding.  
What is best practice to send documents fast to elasticsearch? Can i tune my local install to accept faster document inserts?

Elasticsearch 7.9.3 native (no Docker, no VM) on MacBook Pro (32Gb memory and 1Tb NVMe drive so tuning is possible).

---

<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 9, 2020, 6:46pm UTC](https://discuss.elastic.co/t/elasticsearch-7-9-3-on-mac-dies-when-inserting-documents-fast/254809/2 "2020-11-09T18:46:01Z")

</div>

Could you share elasticsearch full logs please?

---

<div class="post-metadata">

**Author:** ![Toontje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toontje/32/16100_2.png) [@Toontje](https://discuss.elastic.co/u/Toontje)\
**Post date:** [November 9, 2020, 7:00pm UTC](https://discuss.elastic.co/t/elasticsearch-7-9-3-on-mac-dies-when-inserting-documents-fast/254809/3 "2020-11-09T19:00:24Z")

</div>

> **[Archive.zip](https://wetransfer.com/downloads/3c3be407877b0ccb3b2ed8fd7ef9b24620201109190344/6dc2d6)**
>
> 1 file sent via WeTransfer, the simplest way to send your files around the world

Not sure if they are of much use though, but you will let me know for sure.

---

<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 9, 2020, 7:26pm UTC](https://discuss.elastic.co/t/elasticsearch-7-9-3-on-mac-dies-when-inserting-documents-fast/254809/4 "2020-11-09T19:26:36Z")

</div>

Could you share them uncompressed on [gist.GitHub.com](http://gist.GitHub.com)?

---

<div class="post-metadata">

**Author:** ![Toontje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toontje/32/16100_2.png) [@Toontje](https://discuss.elastic.co/u/Toontje)\
**Post date:** [November 10, 2020, 9:36am UTC](https://discuss.elastic.co/t/elasticsearch-7-9-3-on-mac-dies-when-inserting-documents-fast/254809/5 "2020-11-10T09:36:31Z")

</div>

I am now throttling the message flow to 250 messages/second and that seems to work fine. Slow, but ok.

---

<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 10, 2020, 11:14am UTC](https://discuss.elastic.co/t/elasticsearch-7-9-3-on-mac-dies-when-inserting-documents-fast/254809/6 "2020-11-10T11:14:41Z")

</div>

That's not a good solution IMO. I mean that the fix is now probably hiding a problem

---

<div class="post-metadata">

**Author:** ![Toontje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toontje/32/16100_2.png) [@Toontje](https://discuss.elastic.co/u/Toontje)\
**Post date:** [November 10, 2020, 12:20pm UTC](https://discuss.elastic.co/t/elasticsearch-7-9-3-on-mac-dies-when-inserting-documents-fast/254809/7 "2020-11-10T12:20:24Z")

</div>

Agree. But i'm just starting using ES. I have no clue (yet) how to get around this problem. Aggregate the data and then bulk load maybe?

---

<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 10, 2020, 12:41pm UTC](https://discuss.elastic.co/t/elasticsearch-7-9-3-on-mac-dies-when-inserting-documents-fast/254809/8 "2020-11-10T12:41:53Z")

</div>

I look at your logs (please next time share them on [gist.github.com](http://gist.github.com) so they can be read even on a mobile phone. It will help to get a faster answer).

Some comments:

```auto
[2020-10-29T08:46:23,622][INFO][o.e.e.NodeEnvironment] [Laptop] heap size [1gb], compressed ordinary object pointers [true]

```

This is probably too low for the heap size, specifically if you are indexing a lot of data per second with huge bulks.

I can't see anything in logs between those 2 lines. That'd mean a hard stop of the process, like a JVM OOM Killer maybe...

```auto
[2020-10-31T01:00:10,733][INFO][o.e.c.m.MetadataCreateIndexService] [Laptop] [.monitoring-es-7-2020.10.31] creating index, cause [auto(bulk api)], templates [.monitoring-es], shards [1]/[0]
[2020-10-31T11:25:35,862][INFO][o.e.n.Node] [Laptop] version[7.9.3], pid[993], build[default/tar/c4138e51121ef06a6404866cddc601906fe5c868/2020-10-16T10:36:16.141335Z], OS[Mac OS X/10.15.7/x86_64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/15/15+36-1562]

```

Here we can see that something/someone stopped the node. Was that you?

```auto
[2020-11-02T14:29:18,805][INFO][o.e.n.Node] [Laptop] stopping ...
[2020-11-06T15:31:18,402][INFO][o.e.n.Node] [Laptop] stopping ...
[2020-11-07T16:25:49,959][INFO][o.e.n.Node] [Laptop] stopping ...
[2020-11-09T18:32:42,186][INFO][o.e.n.Node] [Laptop] stopping ...

```

If it was not done by you intentionally, it might indicate that a process kills elasticsearch for you.  
Check that you don't have any oom jvm killer and increase the HEAP anyway.

---

<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 8, 2020, 12:41pm UTC](https://discuss.elastic.co/t/elasticsearch-7-9-3-on-mac-dies-when-inserting-documents-fast/254809/9 "2020-12-08T12:41:56Z")

</div>

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