# Index is getting deleted automatically with-out deletion policy or command

**URL:** <https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988>\
**Category:** Elasticsearch\
**Created:** [February 21, 2021, 4:01pm UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988 "2021-02-21T16:01:17Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rinku\_Gulia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rinku_gulia/32/83691_2.png) [@Rinku\_Gulia](https://discuss.elastic.co/u/Rinku_Gulia)\
**Post date:** [February 21, 2021, 4:01pm UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/1 "2021-02-21T16:01:17Z")

</div>

We are adding data to our 2 indexes( interaction-open\_read\_model\_12 and interaction-closed\_read\_model\_12) with aliases(list\_open\_interactions\_12 && list\_closed\_interactions\_1). we have 3 node system.  
Almost in one day, we are adding 60 million data in these 2 indexes.  
Somehow after adding 100 million or 120 million of data, index got deleted automatically.  
When i debugged it , i didnt find any trace why index got deleted automatically. Checked for policy , we have policy which is only for interaction-closed\_read\_model index which is time based (120 days) .that is for sure not doing anything.  
Checked for elastic logs as well as if there is cluster restart happened or not. checked for memory as well. enough memory is available.  
Note: Aliases don't delete . only these 2's :- interaction-open\_read\_model\_12 and interaction-closed\_read\_model\_12 deletion happens. This also i want to know if somehow index deleted then why aliases didnt delete as well.  
Need to know what next to be checked to analyze the index deletion.

---

<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:** [February 21, 2021, 9:37pm UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/2 "2021-02-21T21:37:29Z")

</div>

Welcome to our community! 😃

Is there anything in your Elasticsearch logs what show these being deleted?

---

<div class="post-metadata">

**Author:** ![Rinku\_Gulia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rinku_gulia/32/83691_2.png) [@Rinku\_Gulia](https://discuss.elastic.co/u/Rinku_Gulia)\
**Post date:** [February 22, 2021, 8:09am UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/3 "2021-02-22T08:09:50Z")

</div>

@warkolm Unfortunately, there are no elastic logs indicating index deletion.  
only logs which were present in my cluster file:

 ![Screenshot from 2021-02-22 13-42-47](https://us1.discourse-cdn.com/elastic/original/3X/f/e/fe3e2a30fc51c657af0dcd52d9eb2f55eb8edd9f.jpeg)

just 4-5 hrs back , one new type of logs started coming:(i think in one of the elastic post , i have read that these are not elastic sepecific)

 ![Screenshot from 2021-02-22 13-43-08](https://us1.discourse-cdn.com/elastic/original/3X/d/d/dd18dc6d0bf888d35bd840766a1818daec81e811.jpeg)

---

<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:** [February 22, 2021, 10:29pm UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/4 "2021-02-22T22:29:39Z")

</div>

Please don't post pictures of text, they are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them 🙂

---

<div class="post-metadata">

**Author:** ![Rinku\_Gulia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rinku_gulia/32/83691_2.png) [@Rinku\_Gulia](https://discuss.elastic.co/u/Rinku_Gulia)\
**Post date:** [February 28, 2021, 8:00am UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/5 "2021-02-28T08:00:40Z")

</div>

@warkolm please find the logs below : at 2021-02-27T23:44 deletion happened and again at 2021-02-27T23:45.18 my code again created the index. want to know why deletion happened after adding around 22 crore data in interaction-closed\_read\_model\_1 and interaction-open\_read\_model\_1 indexes:  
[2021-02-27T23:44:02,672][DEBUG][o.e.c.c.PublicationTransportHandler] [node-1] received diff cluster state version [185962] with uuid [ojDy5hJRRgKh4KlVSVEGFQ], diff size [334]  
[2021-02-27T23:44:02,718][DEBUG][o.e.c.s.ClusterApplierService] [node-1] processing [ApplyCommitRequest{term=17, version=185962, sourceNode={node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}}]: execute  
[2021-02-27T23:44:02,718][DEBUG][o.e.c.s.ClusterApplierService] [node-1] cluster state updated, version [185962], source [ApplyCommitRequest{term=17, version=185962, sourceNode={node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}}]  
[2021-02-27T23:44:02,718][DEBUG][o.e.c.NodeConnectionsService] [node-1] connected to {node-1}{GUwYQtiBQje-PvtA9SmufQ}{fGIObAj3TRipx\_rr9nI\_fA}{10.0.0.7}{10.0.0.7:9300}{dilm}{ml.machine\_memory=31449726976, xpack.installed=true, ml.max\_open\_jobs=20}  
[2021-02-27T23:44:02,718][DEBUG][o.e.c.NodeConnectionsService] [node-1] connected to {node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}  
[2021-02-27T23:44:02,718][DEBUG][o.e.c.NodeConnectionsService] [node-1] connected to {node-2}{6HjYRLd4TsGvZ8Ykzy0JpA}{u\_pdGdZUSq6kURY5qykAwg}{10.0.0.6}{10.0.0.6:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}  
[2021-02-27T23:44:02,719][DEBUG][o.e.c.s.ClusterApplierService] [node-1] applying settings from cluster state with version 185962  
[2021-02-27T23:44:02,719][DEBUG][o.e.c.s.ClusterApplierService] [node-1] apply cluster state with version 185962  
[2021-02-27T23:44:02,719][DEBUG][o.e.i.c.IndicesClusterStateService] [node-1] [[interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg]] cleaning index, no longer part of the metadata  
[2021-02-27T23:44:02,720][DEBUG][o.e.i.IndicesService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001] closing ... (reason [DELETED])  
[2021-02-27T23:44:02,720][DEBUG][o.e.i.IndicesService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg] closing index service (reason [DELETED][index no longer part of the metadata])  
[2021-02-27T23:44:02,720][DEBUG][o.e.i.IndexService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001] [0] closing... (reason: [index no longer part of the metadata])  
[2021-02-27T23:44:02,720][DEBUG][o.e.i.s.IndexShard] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][0] state: [STARTED]-\>[CLOSED], reason [index no longer part of the metadata]  
[2021-02-27T23:44:02,720][DEBUG][o.e.i.e.Engine] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][0] close now acquiring writeLock  
[2021-02-27T23:44:02,720][DEBUG][o.e.i.e.Engine] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][0] close acquired writeLock  
[2021-02-27T23:44:02,723][DEBUG][o.e.i.t.Translog] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][0] translog closed  
[2021-02-27T23:44:02,742][DEBUG][o.e.i.e.Engine] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][0] engine closed [api]  
[2021-02-27T23:44:03,617][DEBUG][o.e.i.s.Store] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][0] store reference count on close: 0  
[2021-02-27T23:44:03,617][DEBUG][o.e.i.IndexService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001] [0] closed (reason: [index no longer part of the metadata])  
[2021-02-27T23:44:03,617][DEBUG][o.e.i.IndexService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001] [1] closing... (reason: [index no longer part of the metadata])  
[2021-02-27T23:44:03,617][DEBUG][o.e.i.s.IndexShard] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][1] state: [STARTED]-\>[CLOSED], reason [index no longer part of the metadata]  
[2021-02-27T23:44:03,618][DEBUG][o.e.i.e.Engine] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][1] close now acquiring writeLock  
[2021-02-27T23:44:03,618][DEBUG][o.e.i.e.Engine] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][1] close acquired writeLock  
[2021-02-27T23:44:03,621][DEBUG][o.e.i.t.Translog] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][1] translog closed  
[2021-02-27T23:44:03,630][DEBUG][o.e.i.e.Engine] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][1] engine closed [api]  
[2021-02-27T23:44:04,311][DEBUG][o.e.i.s.Store] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][1] store reference count on close: 0  
[2021-02-27T23:44:04,311][DEBUG][o.e.i.IndexService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001] [1] closed (reason: [index no longer part of the metadata])  
[2021-02-27T23:44:04,311][DEBUG][o.e.i.IndexService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001] [2] closing... (reason: [index no longer part of the metadata])  
[2021-02-27T23:44:04,311][DEBUG][o.e.i.s.IndexShard] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][2] state: [STARTED]-\>[CLOSED], reason [index no longer part of the metadata]  
[2021-02-27T23:44:04,311][DEBUG][o.e.i.e.Engine] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][2] close now acquiring writeLock  
[2021-02-27T23:44:04,311][DEBUG][o.e.i.e.Engine] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][2] close acquired writeLock  
[2021-02-27T23:44:04,313][DEBUG][o.e.i.t.Translog] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][2] translog closed  
[2021-02-27T23:44:04,328][DEBUG][o.e.i.e.Engine] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][2] engine closed [api]  
[2021-02-27T23:44:05,233][DEBUG][o.e.i.s.Store] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001][2] store reference count on close: 0  
[2021-02-27T23:44:05,233][DEBUG][o.e.i.IndexService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001] [2] closed (reason: [index no longer part of the metadata])  
[2021-02-27T23:44:05,233][DEBUG][o.e.i.c.b.BitsetFilterCache] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001] clearing all bitsets because [close]  
[2021-02-27T23:44:05,234][DEBUG][o.e.x.s.a.a.OptOutQueryCache] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001] full cache clear, reason [close]  
[2021-02-27T23:44:05,235][DEBUG][o.e.i.c.b.BitsetFilterCache] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001] clearing all bitsets because [close]  
[2021-02-27T23:44:05,262][DEBUG][o.e.i.IndicesService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg] closed... (reason [DELETED][index no longer part of the metadata])  
[2021-02-27T23:44:05,262][DEBUG][o.e.i.IndicesService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg] deleting index store reason [index no longer part of the metadata]  
[2021-02-27T23:44:05,271][DEBUG][o.e.c.s.ClusterApplierService] [node-1] set locally applied cluster state to version 185962  
[2021-02-27T23:44:05,271][DEBUG][o.e.x.s.s.SecurityIndexManager] [node-1] Index [.security] is not available - no metadata  
[2021-02-27T23:44:05,271][DEBUG][o.e.x.s.s.SecurityIndexManager] [node-1] Index [.security-tokens] is not available - no metadata  
[2021-02-27T23:44:05,272][DEBUG][o.e.i.IndicesService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg] processing pending deletes  
[2021-02-27T23:44:05,273][DEBUG][o.e.l.LicenseService] [node-1] previous [LicensesMetaData{license={"uid":"97a48578-7897-495d-9c2a-e915e31c2483","type":"basic","issue\_date\_in\_millis":1603818714114,"max\_nodes":1000,"issued\_to":"fusion-cluster","issuer":"elasticsearch","signature":"/////AAAANBmHmEg8/f+rp7G4NjtaihGwWrTFN8l5G2imKxLBFY651MCnvtOh8rPFqSBUu/JpU2D5j95mIfUcdlTJHVdk9NpPTFMKL5wC7BXn4CTS6kNo/CBB5aWWIF4O1KvAGtJL/ur8V25UiJpE3QWCb0mA4Ii7A6s8ifceV1hsGL4+iPXBfOhSsHlE53EcfGmMffDRO+qERw4rcNPqkRyRwrC4yCasQRBhQYU8kM+ddTk6/lr1+uXNokrMI+I+cnqsCcoBcUfoyWHFXBUWXsLBHTjLbIC","start\_date\_in\_millis":-1}, trialVersion=null}]  
[2021-02-27T23:44:05,274][DEBUG][o.e.l.LicenseService] [node-1] current [LicensesMetaData{license={"uid":"97a48578-7897-495d-9c2a-e915e31c2483","type":"basic","issue\_date\_in\_millis":1603818714114,"max\_nodes":1000,"issued\_to":"fusion-cluster","issuer":"elasticsearch","signature":"/////AAAANBmHmEg8/f+rp7G4NjtaihGwWrTFN8l5G2imKxLBFY651MCnvtOh8rPFqSBUu/JpU2D5j95mIfUcdlTJHVdk9NpPTFMKL5wC7BXn4CTS6kNo/CBB5aWWIF4O1KvAGtJL/ur8V25UiJpE3QWCb0mA4Ii7A6s8ifceV1hsGL4+iPXBfOhSsHlE53EcfGmMffDRO+qERw4rcNPqkRyRwrC4yCasQRBhQYU8kM+ddTk6/lr1+uXNokrMI+I+cnqsCcoBcUfoyWHFXBUWXsLBHTjLbIC","start\_date\_in\_millis":-1}, trialVersion=null}]  
[2021-02-27T23:44:05,274][DEBUG][o.e.c.s.ClusterApplierService] [node-1] processing [ApplyCommitRequest{term=17, version=185962, sourceNode={node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}}]: took [2.6s] done applying updated cluster state (version: 185962, uuid: ojDy5hJRRgKh4KlVSVEGFQ)  
[2021-02-27T23:44:10,661][DEBUG][o.a.h.i.c.PoolingHttpClientConnectionManager] [node-1] Closing expired connections  
[2021-02-27T23:44:15,975][DEBUG][o.e.c.c.PublicationTransportHandler] [node-1] received diff cluster state version [185963] with uuid [4yyip22OSrKkQujxeGuOEg], diff size [322]  
[2021-02-27T23:44:16,019][DEBUG][o.e.c.s.ClusterApplierService] [node-1] processing [ApplyCommitRequest{term=17, version=185963, sourceNode={node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}}]: execute  
[2021-02-27T23:44:16,020][DEBUG][o.e.c.s.ClusterApplierService] [node-1] cluster state updated, version [185963], source [ApplyCommitRequest{term=17, version=185963, sourceNode={node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}}]  
[2021-02-27T23:44:16,020][DEBUG][o.e.c.NodeConnectionsService] [node-1] connected to {node-1}{GUwYQtiBQje-PvtA9SmufQ}{fGIObAj3TRipx\_rr9nI\_fA}{10.0.0.7}{10.0.0.7:9300}{dilm}{ml.machine\_memory=31449726976, xpack.installed=true, ml.max\_open\_jobs=20}  
[2021-02-27T23:44:16,020][DEBUG][o.e.c.NodeConnectionsService] [node-1] connected to {node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}  
[2021-02-27T23:44:16,020][DEBUG][o.e.c.NodeConnectionsService] [node-1] connected to {node-2}{6HjYRLd4TsGvZ8Ykzy0JpA}{u\_pdGdZUSq6kURY5qykAwg}{10.0.0.6}{10.0.0.6:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}  
[2021-02-27T23:44:16,020][DEBUG][o.e.c.s.ClusterApplierService] [node-1] applying settings from cluster state with version 185963  
[2021-02-27T23:44:16,020][DEBUG][o.e.c.s.ClusterApplierService] [node-1] apply cluster state with version 185963  
[2021-02-27T23:44:16,022][DEBUG][o.e.i.c.IndicesClusterStateService] [node-1] [[interaction-open\_read\_model\_1/7ioUsKZpRAG1z7k9EMXTPA]] cleaning index, no longer part of the metadata  
[2021-02-27T23:44:16,022][DEBUG][o.e.i.IndicesService] [node-1] [interaction-open\_read\_model\_1] closing ... (reason [DELETED])  
[2021-02-27T23:44:16,022][DEBUG][o.e.i.IndicesService] [node-1] [interaction-open\_read\_model\_1/7ioUsKZpRAG1z7k9EMXTPA] closing index service (reason [DELETED][index no longer part of the metadata])  
[2021-02-27T23:44:16,022][DEBUG][o.e.i.IndexService] [node-1] [interaction-open\_read\_model\_1] [0] closing... (reason: [index no longer part of the metadata])  
[2021-02-27T23:44:16,023][DEBUG][o.e.i.s.IndexShard] [node-1] [interaction-open\_read\_model\_1][0] state: [STARTED]-\>[CLOSED], reason [index no longer part of the metadata]

---

<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:** [February 28, 2021, 8:17am UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/6 "2021-02-28T08:17:44Z")

</div>

Which version of Elasticsearch are you using? How is your cluster configured?

---

<div class="post-metadata">

**Author:** ![Rinku\_Gulia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rinku_gulia/32/83691_2.png) [@Rinku\_Gulia](https://discuss.elastic.co/u/Rinku_Gulia)\
**Post date:** [February 28, 2021, 10:00am UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/7 "2021-02-28T10:00:22Z")

</div>

@Christian_Dahlqvist Please refer the details below:  
curl -XGET "[http://10.0.0.7:9200/\_cat/nodes?v](http://10.0.0.7:9200/_cat/nodes?v)"  
ip heap.percent ram.percent cpu load\_1m load\_5m load\_15m node.role master name  
10.0.0.7 45 99 25 1.29 1.29 1.37 dilm - node-1  
10.0.0.5 30 94 0 0.03 0.25 0.39 dilm \* node-3  
10.0.0.6 28 93 0 0.03 0.28 0.37 dilm - node-2

curl -XGET "[http://10.0.0.7:9200/](http://10.0.0.7:9200/)"  
{  
"name" : "node-1",  
"cluster\_name" : "fusion-cluster",  
"cluster\_uuid" : "8P\_5Xoi8Rw6lZq4ZgtllVg",  
"version" : {  
"number" : "7.4.0",  
"build\_flavor" : "default",  
"build\_type" : "rpm",  
"build\_hash" : "22e1767283e61a198cb4db791ea66e3f11ab9910",  
"build\_date" : "2019-09-27T08:36:48.569419Z",  
"build\_snapshot" : false,  
"lucene\_version" : "8.2.0",  
"minimum\_wire\_compatibility\_version" : "6.8.0",  
"minimum\_index\_compatibility\_version" : "6.0.0-beta1"  
},  
"tagline" : "You Know, for Search"  
}

---

<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:** [February 28, 2021, 11:12am UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/8 "2021-02-28T11:12:33Z")

</div>

Do you have any [ILM policies](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/ilm-get-lifecycle.html) in place that could cause this?

---

<div class="post-metadata">

**Author:** ![Rinku\_Gulia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rinku_gulia/32/83691_2.png) [@Rinku\_Gulia](https://discuss.elastic.co/u/Rinku_Gulia)\
**Post date:** [February 28, 2021, 12:16pm UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/9 "2021-02-28T12:16:58Z")

</div>

@Christian_Dahlqvist we have below policies:  
{  
"closed\_index\_policy" : {  
"version" : 1472,  
"modified\_date" : "2021-02-26T16:21:56.329Z",  
"policy" : {  
"phases" : {  
"hot" : {  
"min\_age" : "0ms",  
"actions" : {  
"rollover" : {  
"max\_age" : "120d"  
},  
"set\_priority" : {  
"priority" : 100  
}  
}  
}  
}  
}  
},  
"slm-history-ilm-policy" : {  
"version" : 1,  
"modified\_date" : "2020-10-27T17:11:54.071Z",  
"policy" : {  
"phases" : {  
"hot" : {  
"min\_age" : "0ms",  
"actions" : {  
"rollover" : {  
"max\_size" : "50gb",  
"max\_age" : "30d"  
}  
}  
},  
"delete" : {  
"min\_age" : "90d",  
"actions" : {  
"delete" : { }  
}  
}  
}  
}  
},  
"watch-history-ilm-policy" : {  
"version" : 1,  
"modified\_date" : "2020-10-27T17:11:54.020Z",  
"policy" : {  
"phases" : {  
"delete" : {  
"min\_age" : "7d",  
"actions" : {  
"delete" : { }  
}  
}  
}  
}  
}  
}

and we have only assigned closed\_index\_policy on interaction-closed\_read\_model\_1.

curl -XGET "[http://10.0.0.7:9200/list\*/\_ilm/explain?pretty](http://10.0.0.7:9200/list*/_ilm/explain?pretty)"  
{  
"indices" : {  
"interaction-open\_read\_model\_1" : {  
"index" : "interaction-open\_read\_model\_1",  
"managed" : false  
},  
"interaction-closed\_read\_model\_1-2021.02.27-00001" : {  
"index" : "interaction-closed\_read\_model\_1-2021.02.27-00001",  
"managed" : true,  
"policy" : "closed\_index\_policy",  
"lifecycle\_date\_millis" : 1614469518610,  
"age" : "12.43h",  
"phase" : "hot",  
"phase\_time\_millis" : 1614469519007,  
"action" : "rollover",  
"action\_time\_millis" : 1614469766666,  
"step" : "check-rollover-ready",  
"step\_time\_millis" : 1614469766666,  
"phase\_execution" : {  
"policy" : "closed\_index\_policy",  
"phase\_definition" : {  
"min\_age" : "0ms",  
"actions" : {  
"rollover" : {  
"max\_age" : "120d"  
},  
"set\_priority" : {  
"priority" : 100  
}  
}  
},  
"version" : 1472,  
"modified\_date\_in\_millis" : 1614356516329  
}  
}  
}  
}

---

<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:** [February 28, 2021, 12:27pm UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/10 "2021-02-28T12:27:54Z")

</div>

The `closed_index_policy` appears to have a delete phase in it. Can you check if you have any index templates that assign this to the indices that are being deleted? Can you check if any indices that should not have this applied have it by mistake?

---

<div class="post-metadata">

**Author:** ![Rinku\_Gulia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rinku_gulia/32/83691_2.png) [@Rinku\_Gulia](https://discuss.elastic.co/u/Rinku_Gulia)\
**Post date:** [February 28, 2021, 12:52pm UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/11 "2021-02-28T12:52:18Z")

</div>

@Christian_Dahlqvist we have only 2 indexes: interaction-open\_read\_model\_1 and interaction-closed\_read\_model\_1-2021.02.27-00001. On interaction-closed\_read\_model\_1-2021.02.27-00001 we have applied closed\_index\_policy.  
BTW both indexes get deleted after some time (1-2 days ,around 10-12 crore data...no specific condition).  
You said that closed\_index\_policy has delete phase in it.. could you predict the condition for deletion?. In my opinion, through closed\_index\_policy rollup will happen after 120 days.And it will also not delete the index right?. Furthermore index deletes within 2 days (not 120 days).Please have a look on the policy again  
"closed\_index\_policy":{  
"version":1472,  
"modified\_date":"2021-02-26T16:21:56.329Z",  
"policy":{  
"phases":{  
"hot":{  
"min\_age":"0ms",  
"actions":{  
"rollover":{  
"max\_age":"120d"  
},  
"set\_priority":{  
"priority":100  
}  
}  
}  
}  
}

---

<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:** [February 28, 2021, 1:12pm UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/12 "2021-02-28T13:12:14Z")

</div>

Can you check the logs on all nodes for log message about the index getting deleted (apart from what you have posted)? There might be an info level message on one of the nodes.

---

<div class="post-metadata">

**Author:** ![Rinku\_Gulia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rinku_gulia/32/83691_2.png) [@Rinku\_Gulia](https://discuss.elastic.co/u/Rinku_Gulia)\
**Post date:** [February 28, 2021, 2:36pm UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/13 "2021-02-28T14:36:05Z")

</div>

@Christian_Dahlqvist i am adding logs of all the nodes i have.  
Node -3  
[2021-02-27T23:43:42,434][DEBUG][o.e.i.s.ReplicationTracker] [node-3] [interaction-closed\_read\_model\_1-2021.02.22-00001][2] no retention leases are expired from current retention leases [RetentionLeases{primaryTerm=5, version=24936, leases={peer\_recovery/GUwYQtiBQje-PvtA9SmufQ=RetentionLease{id='peer\_recovery/GUwYQtiBQje-PvtA9SmufQ', retainingSequenceNumber=59941391, timestamp=1614468672369, source='peer recovery'}, peer\_recovery/aps90vcbR\_uIgd88d9B0Rg=RetentionLease{id='peer\_recovery/aps90vcbR\_uIgd88d9B0Rg', retainingSequenceNumber=59941391, timestamp=1614468672369, source='peer recovery'}, peer\_recovery/6HjYRLd4TsGvZ8Ykzy0JpA=RetentionLease{id='peer\_recovery/6HjYRLd4TsGvZ8Ykzy0JpA', retainingSequenceNumber=59941391, timestamp=1614468672369, source='peer recovery'}}}]  
[2021-02-27T23:43:51,392][DEBUG][o.a.h.i.c.PoolingHttpClientConnectionManager] [node-3] Closing expired connections  
[2021-02-27T23:44:01,393][DEBUG][o.a.h.i.c.PoolingHttpClientConnectionManager] [node-3] Closing expired connections  
[2021-02-27T23:44:02,655][DEBUG][o.e.c.s.MasterService] [node-3] executing cluster state update for [delete-index [[interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg]]]  
[2021-02-27T23:44:02,656][INFO][o.e.c.m.MetaDataDeleteIndexService] [node-3] [interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg] deleting index  
[2021-02-27T23:44:02,658][DEBUG][o.e.c.s.MasterService] [node-3] took [0s] to compute cluster state update for [delete-index [[interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg]]]  
[2021-02-27T23:44:02,659][DEBUG][o.e.c.s.MasterService] [node-3] cluster state updated, version [185962], source [delete-index [[interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg]]]  
[2021-02-27T23:44:02,659][DEBUG][o.e.c.s.MasterService] [node-3] publishing cluster state version [185962]  
[2021-02-27T23:44:02,664][DEBUG][o.e.c.c.PublicationTransportHandler] [node-3] received diff cluster state version [185962] with uuid [ojDy5hJRRgKh4KlVSVEGFQ], diff size [334]  
[2021-02-27T23:44:08,921][DEBUG][o.e.c.s.ClusterApplierService] [node-3] processing [Publication{term=17, version=185962}]: execute  
[2021-02-27T23:44:08,921][DEBUG][o.e.c.s.ClusterApplierService] [node-3] cluster state updated, version [185962], source [Publication{term=17, version=185962}]  
[2021-02-27T23:44:08,922][DEBUG][o.e.c.NodeConnectionsService] [node-3] connected to {node-1}{GUwYQtiBQje-PvtA9SmufQ}{fGIObAj3TRipx\_rr9nI\_fA}{10.0.0.7}{10.0.0.7:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}  
[2021-02-27T23:44:08,922][DEBUG][o.e.c.NodeConnectionsService] [node-3] connected to {node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, xpack.installed=true, ml.max\_open\_jobs=20}  
[2021-02-27T23:44:08,922][DEBUG][o.e.c.NodeConnectionsService] [node-3] connected to {node-2}{6HjYRLd4TsGvZ8Ykzy0JpA}{u\_pdGdZUSq6kURY5qykAwg}{10.0.0.6}{10.0.0.6:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}  
[2021-02-27T23:44:08,922][DEBUG][o.e.c.s.ClusterApplierService] [node-3] applying settings from cluster state with version 185962  
[2021-02-27T23:44:08,923][DEBUG][o.e.c.s.ClusterApplierService] [node-3] apply cluster state with version 185962  
[2021-02-27T23:44:08,923][DEBUG][o.e.i.c.IndicesClusterStateService] [node-3] [[interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg]] cleaning index, no longer part of the metadata  
[2021-02-27T23:44:08,923][DEBUG][o.e.i.IndicesService] [node-3] [interaction-closed\_read\_model\_1-2021.02.22-00001] closing ... (reason [DELETED])

Node -2  
[2021-02-27T23:43:35,030][DEBUG][o.a.h.i.c.PoolingHttpClientConnectionManager] [node-2] Closing expired connections  
[2021-02-27T23:43:45,031][DEBUG][o.a.h.i.c.PoolingHttpClientConnectionManager] [node-2] Closing expired connections  
[2021-02-27T23:43:48,302][DEBUG][o.e.i.s.ReplicationTracker] [node-2] [read\_me][0] no retention leases are expired from current retention leases [RetentionLeases{primaryTerm=5, version=56, leas  
es={peer\_recovery/aps90vcbR\_uIgd88d9B0Rg=RetentionLease{id='peer\_recovery/aps90vcbR\_uIgd88d9B0Rg', retainingSequenceNumber=1, timestamp=1614460307964, source='peer recovery'}, peer\_recovery/6Hj  
YRLd4TsGvZ8Ykzy0JpA=RetentionLease{id='peer\_recovery/6HjYRLd4TsGvZ8Ykzy0JpA', retainingSequenceNumber=1, timestamp=1614460307964, source='peer recovery'}}}]  
[2021-02-27T23:43:55,031][DEBUG][o.a.h.i.c.PoolingHttpClientConnectionManager] [node-2] Closing expired connections  
[2021-02-27T23:44:02,675][DEBUG][o.e.c.c.PublicationTransportHandler] [node-2] received diff cluster state version [185962] with uuid [ojDy5hJRRgKh4Kl  
VSVEGFQ], diff size [334]  
[2021-02-27T23:44:02,710][DEBUG][o.e.c.s.ClusterApplierService] [node-2] processing [ApplyCommitRequest{term=17, version=185962, sourceNode={node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}}]: execute  
[2021-02-27T23:44:02,710][DEBUG][o.e.c.s.ClusterApplierService] [node-2] cluster state updated, version [185962], source [ApplyCommitRequest{term=17, version=185962, sourceNode={node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}}]  
[2021-02-27T23:44:02,711][DEBUG][o.e.c.NodeConnectionsService] [node-2] connected to {node-1}{GUwYQtiBQje-PvtA9SmufQ}{fGIObAj3TRipx\_rr9nI\_fA}{10.0.0.7}{10.0.0.7:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}  
[2021-02-27T23:44:02,711][DEBUG][o.e.c.NodeConnectionsService] [node-2] connected to {node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}  
[2021-02-27T23:44:02,711][DEBUG][o.e.c.NodeConnectionsService] [node-2] connected to {node-2}{6HjYRLd4TsGvZ8Ykzy0JpA}{u\_pdGdZUSq6kURY5qykAwg}{10.0.0.6}{10.0.0.6:9300}{dilm}{ml.machine\_memory=31449726976, xpack.installed=true, ml.max\_open\_jobs=20}  
[2021-02-27T23:44:02,711][DEBUG][o.e.c.s.ClusterApplierService] [node-2] applying settings from cluster state with version 185962  
[2021-02-27T23:44:02,712][DEBUG][o.e.c.s.ClusterApplierService] [node-2] apply cluster state with version 185962  
[2021-02-27T23:44:02,712][DEBUG][o.e.i.c.IndicesClusterStateService] [node-2] [[interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg]] cleaning index, no longer part of the metadata  
[2021-02-27T23:44:02,712][DEBUG][o.e.i.IndicesService] [node-2] [interaction-closed\_read\_model\_1-2021.02.22-00001] closing ... (reason [DELETED])  
[2021-02-27T23:44:02,713][DEBUG][o.e.i.IndicesService] [node-2] [interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg] closing index service (reason [DELETED][index no longer part of the metadata])  
[2021-02-27T23:44:02,713][DEBUG][o.e.i.IndexService] [node-2] [interaction-closed\_read\_model\_1-2021.02.22-00001] [0] closing... (reason: [index no longer part of the metadata])  
[2021-02-27T23:44:02,713][DEBUG][o.e.i.s.IndexShard] [node-2] [interaction-closed\_read\_model\_1-2021.02.22-00001][0] state: [STARTED]-\>[CLOSED], reason [index no longer part of the metadata]  
[2021-02-27T23:44:02,714][DEBUG][o.e.i.e.Engine] [node-2] [interaction-closed\_read\_model\_1-2021.02.22-00001][0] close now acquiring writeLock  
[2021-02-27T23:44:02,714][DEBUG][o.e.i.e.Engine] [node-2] [interaction-closed\_read\_model\_1-2021.02.22-00001][0] close acquired writeLock  
[2021-02-27T23:44:02,718][DEBUG][o.e.i.t.Translog] [node-2] [interaction-closed\_read\_model\_1-2021.02.22-00001][0] translog closed

Node -1  
[2021-02-27T23:44:02,718][DEBUG][o.e.c.s.ClusterApplierService] [node-1] cluster state updated, version [185962], source [ApplyCommitRequest{term=17, version=185962, sourceNode={node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}}]  
[2021-02-27T23:44:02,718][DEBUG][o.e.c.NodeConnectionsService] [node-1] connected to {node-1}{GUwYQtiBQje-PvtA9SmufQ}{fGIObAj3TRipx\_rr9nI\_fA}{10.0.0.7}{10.0.0.7:9300}{dilm}{ml.machine\_memory=31449726976, xpack.installed=true, ml.max\_open\_jobs=20}  
[2021-02-27T23:44:02,718][DEBUG][o.e.c.NodeConnectionsService] [node-1] connected to {node-3}{aps90vcbR\_uIgd88d9B0Rg}{ArS4k9tkTlWKyFrUOQsIKA}{10.0.0.5}{10.0.0.5:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}  
[2021-02-27T23:44:02,718][DEBUG][o.e.c.NodeConnectionsService] [node-1] connected to {node-2}{6HjYRLd4TsGvZ8Ykzy0JpA}{u\_pdGdZUSq6kURY5qykAwg}{10.0.0.6}{10.0.0.6:9300}{dilm}{ml.machine\_memory=31449726976, ml.max\_open\_jobs=20, xpack.installed=true}  
[2021-02-27T23:44:02,719][DEBUG][o.e.c.s.ClusterApplierService] [node-1] applying settings from cluster state with version 185962  
[2021-02-27T23:44:02,719][DEBUG][o.e.c.s.ClusterApplierService] [node-1] apply cluster state with version 185962  
[2021-02-27T23:44:02,719][DEBUG][o.e.i.c.IndicesClusterStateService] [node-1] [[interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg]] cleaning index, no longer part of the metadata  
[2021-02-27T23:44:02,720][DEBUG][o.e.i.IndicesService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001] closing ... (reason [DELETED])  
[2021-02-27T23:44:02,720][DEBUG][o.e.i.IndicesService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001/Cg9Jqpq1TF6ebC5MmBRDrg] closing index service (reason [DELETED][index no longer part of the metadata])  
[2021-02-27T23:44:02,720][DEBUG][o.e.i.IndexService] [node-1] [interaction-closed\_read\_model\_1-2021.02.22-00001] [0] closing... (reason: [index no longer part of the metadata])

---

<div class="post-metadata">

**Author:** ![Rinku\_Gulia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rinku_gulia/32/83691_2.png) [@Rinku\_Gulia](https://discuss.elastic.co/u/Rinku_Gulia)\
**Post date:** [March 1, 2021, 4:32am UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/14 "2021-03-01T04:32:17Z")

</div>

@Christian_Dahlqvist Apart from the above logs, i am also sharing below logs which may help to debug it more

node 1:

[2021-02-27T23:28:59,358][DEBUG][o.e.i.IndexingMemoryController] [node-1] now write some indexing buffers: total indexing heap bytes used [819.1mb] vs indices.memory.index\_buffer\_size [815.8mb], currently writing bytes [0b], [3] shards with non-zero indexing buffer  
[2021-02-27T23:28:59,358][DEBUG][o.e.i.IndexingMemoryController] [node-1] write indexing buffer to disk for shard [[interaction-closed\_read\_model\_1-2021.02.22-00001][1]] to free up its [273.4mb] indexing buffer

[2021-02-27T23:34:04,539][DEBUG][o.e.i.IndexingMemoryController] [node-1] now write some indexing buffers: total indexing heap bytes used [817.2mb] vs indices.memory.index\_buffer\_size [815.8mb], currently writing bytes [0b], [6] shards with non-zero indexing buffer  
[2021-02-27T23:34:04,539][DEBUG][o.e.i.IndexingMemoryController] [node-1] write indexing buffer to disk for shard [[interaction-closed\_read\_model\_1-2021.02.22-00001][0]] to free up its [304.8mb] indexing buffer

node 3:

[2021-02-27T23:39:26,354][DEBUG][o.e.x.i.IndexLifecycleRunner] [node-3] policy [closed\_index\_policy] for index [interaction-closed\_read\_model\_1-2021.02.22-00001] on an error step, skipping execution

---

<div class="post-metadata">

**Author:** ![Rinku\_Gulia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rinku_gulia/32/83691_2.png) [@Rinku\_Gulia](https://discuss.elastic.co/u/Rinku_Gulia)\
**Post date:** [March 2, 2021, 3:27am UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/15 "2021-03-02T03:27:12Z")

</div>

@warkolm @Christian_Dahlqvist please update on this

---

<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:** [March 2, 2021, 3:30am UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/16 "2021-03-02T03:30:48Z")

</div>

FYI we don't provide SLAs here, if you need one we can help connect you with our team for a subscription 🙂

If there's nothing in your ILM policies then something externally must be making the request. Do you have Security enabled?

---

<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:** [March 30, 2021, 3:31am UTC](https://discuss.elastic.co/t/index-is-getting-deleted-automatically-with-out-deletion-policy-or-command/264988/17 "2021-03-30T03:31:05Z")

</div>

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