# Too many cached tokens with illegal\_state\_exception error

**URL:** <https://discuss.elastic.co/t/too-many-cached-tokens-with-illegal-state-exception-error/245250>\
**Category:** Elasticsearch\
**Created:** [August 17, 2020, 2:22pm UTC](https://discuss.elastic.co/t/too-many-cached-tokens-with-illegal-state-exception-error/245250 "2020-08-17T14:22:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![111375](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111375/32/73751_2.png) [@111375](https://discuss.elastic.co/u/111375)\
**Post date:** [August 17, 2020, 2:22pm UTC](https://discuss.elastic.co/t/too-many-cached-tokens-with-illegal-state-exception-error/245250/1 "2020-08-17T14:22:17Z")

</div>

While doing bulk request to bulk API I got response with errors:

```auto
Type: (string) (len=23) "illegal_state_exception",
Reason: (string) (len=30) "Too many cached tokens (> 100)"

```

I tried to Google this `Too many cached tokens (> 100)` error, but found nothing.  
Please help me to understand the problem.

ES version: 7.4.1

---

<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:** [August 23, 2020, 11:18pm UTC](https://discuss.elastic.co/t/too-many-cached-tokens-with-illegal-state-exception-error/245250/2 "2020-08-23T23:18:07Z")

</div>

What do your Elasticsearch logs show?  
What is the full error from Elasticsearch?

---

<div class="post-metadata">

**Author:** ![111375](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111375/32/73751_2.png) [@111375](https://discuss.elastic.co/u/111375)\
**Post date:** [August 25, 2020, 4:28pm UTC](https://discuss.elastic.co/t/too-many-cached-tokens-with-illegal-state-exception-error/245250/3 "2020-08-25T16:28:30Z")

</div>

There is a bug - [https://github.com/elastic/elasticsearch/issues/61491](https://github.com/elastic/elasticsearch/issues/61491)

---

<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:** [September 22, 2020, 4:28pm UTC](https://discuss.elastic.co/t/too-many-cached-tokens-with-illegal-state-exception-error/245250/4 "2020-09-22T16:28:40Z")

</div>

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