# Rollover Fails of max\_size condition

**URL:** <https://discuss.elastic.co/t/rollover-fails-of-max-size-condition/244125>\
**Category:** Elasticsearch\
**Created:** [August 7, 2020, 6:46am UTC](https://discuss.elastic.co/t/rollover-fails-of-max-size-condition/244125 "2020-08-07T06:46:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sai\_kiran1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sai_kiran1/32/44118_2.png) [@sai\_kiran1](https://discuss.elastic.co/u/sai_kiran1)\
**Post date:** [August 7, 2020, 6:46am UTC](https://discuss.elastic.co/t/rollover-fails-of-max-size-condition/244125/1 "2020-08-07T06:46:57Z")

</div>

Greetings

I Am trying to create a ilm policy that rolls over my index on size condition

My ilm policy looks like :

```auto
{
"testing_ilm_dataloss" : {
"version" : 7,
"modified_date" : "2020-08-06T14:25:09.434Z",
"policy" : {
"phases" : {
"hot" : {
"min_age" : "0ms",
"actions" : {
"rollover" : {
"max_size" : "5mb"
},
"set_priority" : {
"priority" : 100
}
}
}
}
}
}
}

```

Rollover works fine on age condition but when I try to rollover only on size I don't see any rollover happening to by index.

But when the data is being loaded to the respective index, rollover doesn't happen on the size given(5mb In this case). Below is the rolled over shard details:

index shard prirep state docs store node

dataloss\_monitoring-2020.08.07-1 0 p STARTED 726933 34.8mb svlitctd  
dataloss\_monitoring-2020.08.07-1 0 r STARTED 726933 35.4mb svlitcid  
dataloss\_monitoring-2020.08.07-000003 0 p STARTED 1336040 62.6mb svlitctd  
dataloss\_monitoring-2020.08.07-000003 0 r STARTED 1336040 64.5mb svlitcid  
dataloss\_monitoring-2020.08.07-000002 0 r STARTED 460131 22.9mb svlitctd  
dataloss\_monitoring-2020.08.07-000002 0 p STARTED 460131 22.4mb svlitcid

Can you please let me know what should be done to get the rollover function on the exact size condition.

Thanks,  
Sai

---

<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 11, 2020, 2:56pm UTC](https://discuss.elastic.co/t/rollover-fails-of-max-size-condition/244125/2 "2020-08-11T14:56:48Z")

</div>

Rollover is checked periodically (every 10 minutes by default if I recall correctly). This is great for production size shards but not necessarily when testing it like you are now. Also be aware that the shard size can grow and shrink as merging occurs, so the size threshold is an estimate.

---

<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 8, 2020, 2:56pm UTC](https://discuss.elastic.co/t/rollover-fails-of-max-size-condition/244125/3 "2020-09-08T14:56:49Z")

</div>

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