# Elastic request cache won't invalidate

**URL:** https://discuss.elastic.co/t/elastic-request-cache-wont-invalidate/89935
**Category:** Elasticsearch
**Created:** [June 19, 2017, 1:00pm UTC](https://discuss.elastic.co/t/elastic-request-cache-wont-invalidate/89935 "2017-06-19T13:00:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mett](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mett](https://discuss.elastic.co/u/mett)
#### Post date: [June 19, 2017, 1:00pm UTC](https://discuss.elastic.co/t/elastic-request-cache-wont-invalidate/89935/1 "2017-06-19T13:00:46Z")

</div>

As an aside, is there an easy way to tell which indices have shards on a given node?

I have a cluster of 8 or so mixed use nodes running Elastic 5.0.1. Every couple of days now since a server move the request cache on a few of them fills up beyond the breaker threshold (about 5.7GB on each node).

I've tried both the clear cache api and the refresh api but neither will clear the request cache on affected boxes. Is there some issue here or am I missing out on something?

---

<div class="post-metadata">

### Author: ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)
#### Post date: [June 20, 2017, 9:11pm UTC](https://discuss.elastic.co/t/elastic-request-cache-wont-invalidate/89935/2 "2017-06-20T21:11:01Z")

</div>

> [@mett](#):
>
> As an aside, is there an easy way to tell which indices have shards on a given node?

The [Cluster State API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html) is probably the easiest place to find that info, it'll be under the `routing_table` field. It's a bit verbose though.

> I've tried both the clear cache api and the refresh api but neither will clear the request cache on affected boxes. Is there some issue here or am I missing out on something?

The clear cache API should clear out the request cache. How are you determining that it doesn't clear? Is it possible it fills back up immediately due to active requests running in the system?

You could also try clearing _just_ the request cache with: `POST /test/_cache/clear?request=true`

---

<div class="post-metadata">

### Author: ![mett](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mett](https://discuss.elastic.co/u/mett)
#### Post date: [June 21, 2017, 5:51pm UTC](https://discuss.elastic.co/t/elastic-request-cache-wont-invalidate/89935/3 "2017-06-21T17:51:12Z")

</div>

Thanks for that Cluster state API, exactly what was needed.

Tried just request cache already, not responsive on 5.0.1. I can't see how a 5 GB cache would fill up again immediately?

Could it be out of control garbage collection? We're using OpenJDK on Ubuntu at the moment and I've had personal issues with performance of that before switching over to nonfree Oracle.

---

<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 19, 2017, 5:51pm UTC](https://discuss.elastic.co/t/elastic-request-cache-wont-invalidate/89935/4 "2017-07-19T17:51:19Z")

</div>

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