# Why shard relocating is happening all the time

**URL:** https://discuss.elastic.co/t/why-shard-relocating-is-happening-all-the-time/243648
**Category:** Elasticsearch
**Created:** [August 4, 2020, 5:24am UTC](https://discuss.elastic.co/t/why-shard-relocating-is-happening-all-the-time/243648 "2020-08-04T05:24:43Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![muthug](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/muthug/32/82555_2.png) [@muthug](https://discuss.elastic.co/u/muthug)
#### Post date: [August 4, 2020, 5:24am UTC](https://discuss.elastic.co/t/why-shard-relocating-is-happening-all-the-time/243648/1 "2020-08-04T05:24:43Z")

</div>

Hi All,

Greeting !!

\*\*\* Need URGENT HELP \*\*\*

Why shard relocating happening all the time? Due to that heap percentage is getting increasing

"cluster\_name" : "BPOConnectElasticSearch",  
**"status" : "green",**  
"timed\_out" : false,  
"number\_of\_nodes" : 7,  
"number\_of\_data\_nodes" : 6,  
"active\_primary\_shards" : 17586,  
"active\_shards" : 35172,  
**"relocating\_shards" : 2,**  
"initializing\_shards" : 0,  
"unassigned\_shards" : 0,  
"delayed\_unassigned\_shards" : 0,  
**"number\_of\_pending\_tasks" : 4253,**  
"number\_of\_in\_flight\_fetch" : 0,  
**"task\_max\_waiting\_in\_queue\_millis" : 21983473,**  
"active\_shards\_percent\_as\_number" : 100.0

heap.percent ram.percent load node.role master name  
**73 61 0.48 d - BPOConnectDataNode04**  
19 61 0.56 d m BPOConnectDataNode02  
60 49 0.15 - m BPOConnectManagementNode  
17 63 0.35 d m BPOConnectDataNode01  
**99 56 2.64 d \* BPOConnectDataNode03**  
**98 59 1.95 d m BPOConnectDataNode06**  
11 64 0.80 d m BPOConnectDataNode05

Note: All Node having 50% of heap of RAM. All node have more or equal to 30GB RAM

---

<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: [August 4, 2020, 5:28am UTC](https://discuss.elastic.co/t/why-shard-relocating-is-happening-all-the-time/243648/2 "2020-08-04T05:28:31Z")

</div>

You have _way_ too many shards. We recommend 600-700 per node, not nearly 6000.

You need to reduce that dramatically.

---

<div class="post-metadata">

### Author: ![muthug](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/muthug/32/82555_2.png) [@muthug](https://discuss.elastic.co/u/muthug)
#### Post date: [August 4, 2020, 6:34am UTC](https://discuss.elastic.co/t/why-shard-relocating-is-happening-all-the-time/243648/3 "2020-08-04T06:34:29Z")

</div>

Yes i agree., but past 3 years we are using this setup. How to reduce this shard because all the logs are important and we dont want to increase any additional servers.

Kindly suggest what best we can do?

---

<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: [August 4, 2020, 6:35am UTC](https://discuss.elastic.co/t/why-shard-relocating-is-happening-all-the-time/243648/4 "2020-08-04T06:35:52Z")

</div>

Take a look at - [How do I increase or reduce the shard count of an existing index?](https://discuss.elastic.co/t/how-do-i-increase-or-reduce-the-shard-count-of-an-existing-index/242704)

---

<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: [August 4, 2020, 6:44am UTC](https://discuss.elastic.co/t/why-shard-relocating-is-happening-all-the-time/243648/5 "2020-08-04T06:44:42Z")

</div>

Did the suggestions I provided [In this post](https://discuss.elastic.co/t/client-node-is-frequently-getting-out-from-cluster/243415) not work?

Also please do not open multiple threads about the same issue.

---

<div class="post-metadata">

### Author: ![muthug](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/muthug/32/82555_2.png) [@muthug](https://discuss.elastic.co/u/muthug)
#### Post date: [August 25, 2020, 7:26am UTC](https://discuss.elastic.co/t/why-shard-relocating-is-happening-all-the-time/243648/6 "2020-08-25T07:26:15Z")

</div>

Now its up and running fine:)

---

<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: [September 22, 2020, 7:32am UTC](https://discuss.elastic.co/t/why-shard-relocating-is-happening-all-the-time/243648/8 "2020-09-22T07:32:09Z")

</div>

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