# How to delete memory cache automatically once I have Out of Memory Error with Field Data breaker?

**URL:** https://discuss.elastic.co/t/how-to-delete-memory-cache-automatically-once-i-have-out-of-memory-error-with-field-data-breaker/23174
**Category:** Elasticsearch
**Created:** [April 9, 2015, 3:29pm UTC](https://discuss.elastic.co/t/how-to-delete-memory-cache-automatically-once-i-have-out-of-memory-error-with-field-data-breaker/23174 "2015-04-09T15:29:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Mehmet\_Ozer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mehmet_ozer/32/81567_2.png) [@Mehmet\_Ozer](https://discuss.elastic.co/u/Mehmet_Ozer)
#### Post date: [April 9, 2015, 3:29pm UTC](https://discuss.elastic.co/t/how-to-delete-memory-cache-automatically-once-i-have-out-of-memory-error-with-field-data-breaker/23174/1 "2015-04-09T15:29:04Z")

</div>

Hello,

I am using Field data circuit breaker in order to define cache size for queries that we do during the day. And each night I am launching a script that deletes the memory cache but sometimes I have out of memory error during the day since they have been lots of queries launched so I need to clear the cache myself.

My question is, do we have any option for elasticsearch that cares about the cache clearing once out of memory error is received ?

Thank you

---

<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: [April 10, 2015, 3:43am UTC](https://discuss.elastic.co/t/how-to-delete-memory-cache-automatically-once-i-have-out-of-memory-error-with-field-data-breaker/23174/2 "2015-04-10T03:43:03Z")

</div>

No, you need to do this manually at the moment.

On 10 April 2015 at 01:29, mehmet [mehmetozer1988@gmail.com](mailto:mehmetozer1988@gmail.com) wrote:

> Hello,
> 
> I am using Field data circuit breaker in order to define cache size for  
> queries that we do during the day. And each night I am launching a script  
> that deletes the memory cache but sometimes I have out of memory error  
> during the day since they have been lots of queries launched so I need to  
> clear the cache myself.
> 
> My question is, do we have any option for elasticsearch that cares about  
> the  
> cache clearing once out of memory error is received ?
> 
> Thank you
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/How-to-delete-memory-cache-automatically-once-I-have-Out-of-Memory-Error-with-Field-Data-breaker-tp4073423.html](http://elasticsearch-users.115913.n3.nabble.com/How-to-delete-memory-cache-automatically-once-I-have-Out-of-Memory-Error-with-Field-Data-breaker-tp4073423.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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/1428593344272-4073423.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1428593344272-4073423.post%40n3.nabble.com)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEYi1X9n2qP7HBZEL6jJ%3DWGX%2B746h7CY8cHboxPAgTqQAK32Dw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9n2qP7HBZEL6jJ%3DWGX%2B746h7CY8cHboxPAgTqQAK32Dw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [April 10, 2015, 3:22pm UTC](https://discuss.elastic.co/t/how-to-delete-memory-cache-automatically-once-i-have-out-of-memory-error-with-field-data-breaker/23174/3 "2015-04-10T15:22:08Z")

</div>

Just like an electrical circuit breaker, if it is constantly tripping, this  
indicates an overload condition.

Rather than try to empty out the fielddata memory, perhaps you should use  
doc\_values for the fields which are in the queries that are tripping the  
circuit breaker.

On Thursday, April 9, 2015 at 8:39:59 PM UTC-6, mehmet özer wrote:

> Hello,
> 
> I am using Field data circuit breaker in order to define cache size for  
> queries that we do during the day. And each night I am launching a script  
> that deletes the memory cache but sometimes I have out of memory error  
> during the day since they have been lots of queries launched so I need to  
> clear the cache myself.
> 
> My question is, do we have any option for elasticsearch that cares about  
> the  
> cache clearing once out of memory error is received ?
> 
> Thank you
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/How-to-delete-memory-cache-automatically-once-I-have-Out-of-Memory-Error-with-Field-Data-breaker-tp4073423.html](http://elasticsearch-users.115913.n3.nabble.com/How-to-delete-memory-cache-automatically-once-I-have-Out-of-Memory-Error-with-Field-Data-breaker-tp4073423.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

--  
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/b483e53f-7719-483a-9512-34d9151f386a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b483e53f-7719-483a-9512-34d9151f386a%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, 12:20am UTC](https://discuss.elastic.co/t/how-to-delete-memory-cache-automatically-once-i-have-out-of-memory-error-with-field-data-breaker/23174/4 "2017-07-06T00:20:21Z")

</div>


