# Failure to execute ttl purge

**URL:** <https://discuss.elastic.co/t/failure-to-execute-ttl-purge/19080>\
**Category:** Elasticsearch\
**Created:** [August 4, 2014, 5:42pm UTC](https://discuss.elastic.co/t/failure-to-execute-ttl-purge/19080 "2014-08-04T17:42:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raz\_Baluchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raz_baluchi/32/54444_2.png) [@Raz\_Baluchi](https://discuss.elastic.co/u/Raz_Baluchi)\
**Post date:** [August 4, 2014, 5:42pm UTC](https://discuss.elastic.co/t/failure-to-execute-ttl-purge/19080/1 "2014-08-04T17:42:37Z")

</div>

Our cluster has started to spit out error messages related to purge  
failures. It also appears to have adversely impacted performance. The error  
message is below, any ideas on where to look to fix this error?

[2014-08-04 13:37:22,949][WARN][indices.ttl] [prod2] failed  
to execute ttl purge  
java.lang.ClassCastException:  
org.elasticsearch.index.mapper.core.StringFieldMapper cannot be cast to  
org.elasticsearch.index.mapper.internal.TTLFieldMapper  
at  
org.elasticsearch.indices.ttl.IndicesTTLService$PurgerThread.getShardsToPurge(IndicesTTLService.java:180)  
at  
org.elasticsearch.indices.ttl.IndicesTTLService$PurgerThread.run(IndicesTTLService.java:139)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/89164f46-0efe-430c-a65f-6e5d070a1106%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/89164f46-0efe-430c-a65f-6e5d070a1106%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![brian\_yoder](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@brian\_yoder](https://discuss.elastic.co/u/brian_yoder)\
**Post date:** [August 4, 2014, 7:34pm UTC](https://discuss.elastic.co/t/failure-to-execute-ttl-purge/19080/2 "2014-08-04T19:34:11Z")

</div>

What version of Elasticsearch? Of Java?

How is TTL being used? For example, one extreme is to constantly add log  
data and then delete old data. This case is, of course, best handled with  
time-based indices and a tool such as curator to delete old data by index  
and not by individual document via TTL.

I have run some test cases with TTL using Elasticsearch 1.3.0 and Java  
7u60. I set a \_ttl value of 5m and hammered Elasticsearch. After some time  
passed and several million documents had been added, I shut down the test  
and watched the TTL processing clean up. It took some time but it always  
succeeded. It was rather nice to see that my TTL tests were self-cleaning:  
I always ended up with an empty index after each run.

This discussion may also shed a bit of light:  
[http://elasticsearch-users.115913.n3.nabble.com/TTL-Load-Problems-td4024001.html](http://elasticsearch-users.115913.n3.nabble.com/TTL-Load-Problems-td4024001.html)

Brian

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8544b414-5017-465e-bdd2-665e0e52db7d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8544b414-5017-465e-bdd2-665e0e52db7d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:10am UTC](https://discuss.elastic.co/t/failure-to-execute-ttl-purge/19080/3 "2017-07-06T01:10:52Z")

</div>


