# Rollover policy is not working

**URL:** <https://discuss.elastic.co/t/rollover-policy-is-not-working/311377>\
**Category:** Elasticsearch\
**Created:** [August 4, 2022, 7:19am UTC](https://discuss.elastic.co/t/rollover-policy-is-not-working/311377 "2022-08-04T07:19:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankit\_Grover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankit_grover/32/97675_2.png) [@Ankit\_Grover](https://discuss.elastic.co/u/Ankit_Grover)\
**Post date:** [August 4, 2022, 7:19am UTC](https://discuss.elastic.co/t/rollover-policy-is-not-working/311377/1 "2022-08-04T07:19:07Z")

</div>

my rollover policy is not working after the condition fail of 2mb document size can anyone please help me. I am newbie in elk stack.  
Thanks

---

<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, 2022, 7:22am UTC](https://discuss.elastic.co/t/rollover-policy-is-not-working/311377/2 "2022-08-04T07:22:12Z")

</div>

Welcome to our community! 😃

Please provide more information so that we can help you. If you are talking about ILM, then sharing your policy would be a good start.

---

<div class="post-metadata">

**Author:** ![Ankit\_Grover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankit_grover/32/97675_2.png) [@Ankit\_Grover](https://discuss.elastic.co/u/Ankit_Grover)\
**Post date:** [August 4, 2022, 7:27am UTC](https://discuss.elastic.co/t/rollover-policy-is-not-working/311377/4 "2022-08-04T07:27:45Z")

</div>

Thankyou for your kind response.... I have attached screenshot of ILM plicy below

 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/0/4/042233b2b67e01473c80e64c2bda4c1a3fd43542.png)

---

<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, 2022, 10:36am UTC](https://discuss.elastic.co/t/rollover-policy-is-not-working/311377/5 "2022-08-04T10:36:41Z")

</div>

Generally ILM won't trigger on small sizes like that, you might need to try something a little larger.

---

<div class="post-metadata">

**Author:** ![Ankit\_Grover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankit_grover/32/97675_2.png) [@Ankit\_Grover](https://discuss.elastic.co/u/Ankit_Grover)\
**Post date:** [August 4, 2022, 10:46am UTC](https://discuss.elastic.co/t/rollover-policy-is-not-working/311377/6 "2022-08-04T10:46:17Z")

</div>

Do you have any idea at which size ILM will trigger ?? Can we create index automatically every time if the condition specified in ILM fails?

---

<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, 2022, 10:52am UTC](https://discuss.elastic.co/t/rollover-policy-is-not-working/311377/7 "2022-08-04T10:52:50Z")

</div>

Note that the total index size [only takes the size of primary shards belonging to the index into account](https://www.elastic.co/guide/en/elasticsearch/reference/8.2/ilm-rollover.html). As the number of replica shards across the cluster can quickly change over time they are not included in the calculation. I also believe ILM estimates the size as the actual size can vary a lot over time due to merging activity. It also only checks for rollover periodically and I think the default is 10 minutes or so.

---

<div class="post-metadata">

**Author:** ![Ankit\_Grover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankit_grover/32/97675_2.png) [@Ankit\_Grover](https://discuss.elastic.co/u/Ankit_Grover)\
**Post date:** [August 4, 2022, 12:14pm UTC](https://discuss.elastic.co/t/rollover-policy-is-not-working/311377/8 "2022-08-04T12:14:50Z")

</div>

Thankyou @Christian_Dahlqvist @warkolm, I got your point and try larger size and will let you know after it  
Thanks

---

<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 1, 2022, 12:15pm UTC](https://discuss.elastic.co/t/rollover-policy-is-not-working/311377/9 "2022-09-01T12:15:01Z")

</div>

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