# How to troubleshoot memory problems

**URL:** <https://discuss.elastic.co/t/how-to-troubleshoot-memory-problems/89724>\
**Category:** Elasticsearch\
**Created:** [June 16, 2017, 1:29pm UTC](https://discuss.elastic.co/t/how-to-troubleshoot-memory-problems/89724 "2017-06-16T13:29:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ygokirmak](https://avatars.discourse-cdn.com/v4/letter/y/d07c76/32.png) [@ygokirmak](https://discuss.elastic.co/u/ygokirmak)\
**Post date:** [June 16, 2017, 1:29pm UTC](https://discuss.elastic.co/t/how-to-troubleshoot-memory-problems/89724/1 "2017-06-16T13:29:18Z")

</div>

Hi,

I have elasticsearch cluster with 2 nodes. We are persisting e-commerce customer behavior events like product\_view, add\_to\_basket etc in an index named events. Daily we have 30gb of data we are doing hourly indexing.. (1 shard, 1 replica)

Each server has 32 gb ram, 16 gb is assigned to elasticsearch

The problem is somehow elasticsearch nodes gets memory dump and stops. I don't know how to troubleshoot and find the root cause.

We have some nested type fields in mapping I suspect these mappings somehow effecting the system.

How should I troubleshoot, where to start; can you give me some clues for troubleshooting

* * *

```
{
  "name" : "node-3",
  "cluster_name" : "dh-elastic",
  "cluster_uuid" : "BIbNjAr9Rs28mWjVOLbYbA",
  "version" : {
    "number" : "5.4.0",
    "build_hash" : "780f8c4",
    "build_date" : "2017-04-28T17:43:27.229Z",
    "build_snapshot" : false,
    "lucene_version" : "6.5.0"
  },
  "tagline" : "You Know, for Search"
}
```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 16, 2017, 1:41pm UTC](https://discuss.elastic.co/t/how-to-troubleshoot-memory-problems/89724/2 "2017-06-16T13:41:38Z")

</div>

Why are you using hourly indices? How long do you keep your data?

---

<div class="post-metadata">

**Author:** ![ygokirmak](https://avatars.discourse-cdn.com/v4/letter/y/d07c76/32.png) [@ygokirmak](https://discuss.elastic.co/u/ygokirmak)\
**Post date:** [June 16, 2017, 1:45pm UTC](https://discuss.elastic.co/t/how-to-troubleshoot-memory-problems/89724/3 "2017-06-16T13:45:21Z")

</div>

we want to keep 3 months data. It was daily index but we thought may be this is causing the problem and changed it to hourly.. but still getting heap dump

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 16, 2017, 1:53pm UTC](https://discuss.elastic.co/t/how-to-troubleshoot-memory-problems/89724/4 "2017-06-16T13:53:49Z")

</div>

Hourly indices seem like overkill. A daily index with 2 primary shards might be better. Having lots of small shards is inefficient as each shard has overhead. Do you have X-Pack monitoring installed?

---

<div class="post-metadata">

**Author:** ![ygokirmak](https://avatars.discourse-cdn.com/v4/letter/y/d07c76/32.png) [@ygokirmak](https://discuss.elastic.co/u/ygokirmak)\
**Post date:** [June 16, 2017, 2:00pm UTC](https://discuss.elastic.co/t/how-to-troubleshoot-memory-problems/89724/5 "2017-06-16T14:00:02Z")

</div>

Ok, I will change to daily index with 2 shards;

we don't have x-pack but I am using elastichq for monitoring. I can install xpack what should I check after install?

---

<div class="post-metadata">

**Author:** ![ygokirmak](https://avatars.discourse-cdn.com/v4/letter/y/d07c76/32.png) [@ygokirmak](https://discuss.elastic.co/u/ygokirmak)\
**Post date:** [July 12, 2017, 6:53am UTC](https://discuss.elastic.co/t/how-to-troubleshoot-memory-problems/89724/6 "2017-07-12T06:53:59Z")

</div>

@Christian_Dahlqvist I have x-pack now..

Elasticsearch "hangs" without any pattern, so where should I start for trouble shooting,  
can u guide or direct 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:** [August 9, 2017, 6:54am UTC](https://discuss.elastic.co/t/how-to-troubleshoot-memory-problems/89724/7 "2017-08-09T06:54:01Z")

</div>

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