# Shards Bulk exception

**URL:** <https://discuss.elastic.co/t/shards-bulk-exception/176610>\
**Category:** Elasticsearch\
**Created:** [April 12, 2019, 11:23am UTC](https://discuss.elastic.co/t/shards-bulk-exception/176610 "2019-04-12T11:23:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![aniaks](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@aniaks](https://discuss.elastic.co/u/aniaks)\
**Post date:** [April 12, 2019, 11:23am UTC](https://discuss.elastic.co/t/shards-bulk-exception/176610/1 "2019-04-12T11:23:32Z")

</div>

See loads of bulk exceptions .... could it be due to high number of shards ...

we have 24 data nodes 10,800 shards ? and discovery.zen.minimum\_master\_nodes = 13

queue size = 410

let me know ?

---

<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:** [April 12, 2019, 11:27am UTC](https://discuss.elastic.co/t/shards-bulk-exception/176610/2 "2019-04-12T11:27:01Z")

</div>

Are you seeing exceptions or rejections? How many of these shards are you actively indexing into?

---

<div class="post-metadata">

**Author:** ![aniaks](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@aniaks](https://discuss.elastic.co/u/aniaks)\
**Post date:** [April 12, 2019, 11:39am UTC](https://discuss.elastic.co/t/shards-bulk-exception/176610/3 "2019-04-12T11:39:53Z")

</div>

Rejections ... almost most of the shards are actively indexing .....

---

<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:** [April 12, 2019, 11:47am UTC](https://discuss.elastic.co/t/shards-bulk-exception/176610/4 "2019-04-12T11:47:06Z")

</div>

Then please have a look at [this blog post](https://www.elastic.co/blog/why-am-i-seeing-bulk-rejections-in-my-elasticsearch-cluster). Reducing shard count or making each bulk request target only a few indices might help reduce the amount of rejections.

---

<div class="post-metadata">

**Author:** ![aniaks](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@aniaks](https://discuss.elastic.co/u/aniaks)\
**Post date:** [April 12, 2019, 12:01pm UTC](https://discuss.elastic.co/t/shards-bulk-exception/176610/5 "2019-04-12T12:01:16Z")

</div>

Thanks Chris. Just read the blog and wondering since the cluster seems well balanced and shards are equally spread out.

is queueSize 410 good for 24 data nodes ? Reading the documents i see it is less and can be upped a bit to 600. Appreciate your valuable suggestions on this regard ..

---

<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:** [April 12, 2019, 12:14pm UTC](https://discuss.elastic.co/t/shards-bulk-exception/176610/6 "2019-04-12T12:14:44Z")

</div>

Increasing the queue size leads to increased resource usage and does not necessarily solve the underlying problem. It is more like putting a band-aid on.

I would recommend looking into how you are indexing and see if there are improvements to be made there or by changing the sharing scheme.

How many indices do these shards belong to? How much data do they hold?

---

<div class="post-metadata">

**Author:** ![aniaks](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@aniaks](https://discuss.elastic.co/u/aniaks)\
**Post date:** [April 12, 2019, 7:25pm UTC](https://discuss.elastic.co/t/shards-bulk-exception/176610/7 "2019-04-12T19:25:51Z")

</div>

440 shards to each node and average size of indices on each node is around 280GB

---

<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:** [April 12, 2019, 9:21pm UTC](https://discuss.elastic.co/t/shards-bulk-exception/176610/8 "2019-04-12T21:21:29Z")

</div>

That gives an average shard size of less than 1GB which is very small. Have a look at [this blog post](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster) for some practical guidelines around shards and sharding.

---

<div class="post-metadata">

**Author:** ![aniaks](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@aniaks](https://discuss.elastic.co/u/aniaks)\
**Post date:** [April 14, 2019, 11:55am UTC](https://discuss.elastic.co/t/shards-bulk-exception/176610/9 "2019-04-14T11:55:18Z")

</div>

Thanks Chris. I will go through this.

---

<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:** [May 12, 2019, 12:00pm UTC](https://discuss.elastic.co/t/shards-bulk-exception/176610/10 "2019-05-12T12:00:48Z")

</div>

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