# .ml-state is too big

**URL:** <https://discuss.elastic.co/t/ml-state-is-too-big/131561>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [May 12, 2018, 7:54am UTC](https://discuss.elastic.co/t/ml-state-is-too-big/131561 "2018-05-12T07:54:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alah64](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alah64/32/100065_2.png) [@alah64](https://discuss.elastic.co/u/alah64)\
**Post date:** [May 12, 2018, 7:54am UTC](https://discuss.elastic.co/t/ml-state-is-too-big/131561/1 "2018-05-12T07:54:02Z")

</div>

after delete machine learning job , model state data is remaining in .ml-state index.  
another is :why remain model state for 200 days ago without timestamp field for delete them?  
now it takes 8gb for deleted jobs and garbedge data.

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [May 12, 2018, 1:54pm UTC](https://discuss.elastic.co/t/ml-state-is-too-big/131561/2 "2018-05-12T13:54:51Z")

</div>

Hi - thanks for reporting this. The model state data should be deleted when a corresponding job is deleted. If this is happening then perhaps there is some bug or reason why the initial attempt at deleting the state has failed.

We'll track this issue here: [https://github.com/elastic/elasticsearch/issues/30551](https://github.com/elastic/elasticsearch/issues/30551)

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [May 18, 2018, 10:15am UTC](https://discuss.elastic.co/t/ml-state-is-too-big/131561/3 "2018-05-18T10:15:27Z")

</div>

The above bug is resolved in 6.3.0 (and 6.2.5 if that version is ever released).

---

<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:** [June 15, 2018, 10:15am UTC](https://discuss.elastic.co/t/ml-state-is-too-big/131561/4 "2018-06-15T10:15:31Z")

</div>

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