# Context length is bigger than maximum allowed string

**URL:** <https://discuss.elastic.co/t/context-length-is-bigger-than-maximum-allowed-string/356985>\
**Category:** Kibana\
**Created:** [April 8, 2024, 3:00pm UTC](https://discuss.elastic.co/t/context-length-is-bigger-than-maximum-allowed-string/356985 "2024-04-08T15:00:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankita\_Pachauri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankita_pachauri/32/61469_2.png) [@Ankita\_Pachauri](https://discuss.elastic.co/u/Ankita_Pachauri)\
**Post date:** [April 8, 2024, 3:00pm UTC](https://discuss.elastic.co/t/context-length-is-bigger-than-maximum-allowed-string/356985/1 "2024-04-08T15:00:52Z")

</div>

Hi Team,

We are trying to fetch log events on the discover tab and getting the following error. The log events consists of large Java stacks.

 ![WhatsApp Image 2024-04-08 at 19.50.32_ad4d629a](https://us1.discourse-cdn.com/elastic/original/3X/b/a/ba500257e31192ee47dfd916c0d345b1924c3dc5.jpeg)

We are using ELK version 8.10.

I tried updating the server.maxPayload to 11057591792, however doing this does not resolve the issue. The server has 16GB of RAM, out of which 12GB is assigned to Kibana.

Can someone please help me with a solution to this problem?

//Ankita

---

<div class="post-metadata">

**Author:** ![jessgarson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jessgarson/32/129841_2.png) [@jessgarson](https://discuss.elastic.co/u/jessgarson)\
**Post date:** [April 8, 2024, 3:12pm UTC](https://discuss.elastic.co/t/context-length-is-bigger-than-maximum-allowed-string/356985/2 "2024-04-08T15:12:47Z")

</div>

Thanks for reaching out, @Ankita_Pachauri; there was a [similar post](https://discuss.elastic.co/t/search-error-the-content-length-897957165-is-bigger-than-the-maximum-allowed-string-536870888/285100/2) that might be a good starting point for resolving this issue.

Best,

Jessica

---

<div class="post-metadata">

**Author:** ![Ankita\_Pachauri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankita_pachauri/32/61469_2.png) [@Ankita\_Pachauri](https://discuss.elastic.co/u/Ankita_Pachauri)\
**Post date:** [April 8, 2024, 5:56pm UTC](https://discuss.elastic.co/t/context-length-is-bigger-than-maximum-allowed-string/356985/3 "2024-04-08T17:56:53Z")

</div>

Hi Jess,  
Project requirement is such that we cannot truncate the logs. Can you please support with some alternative options?

//Ankita

---

<div class="post-metadata">

**Author:** ![jessgarson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jessgarson/32/129841_2.png) [@jessgarson](https://discuss.elastic.co/u/jessgarson)\
**Post date:** [April 8, 2024, 10:08pm UTC](https://discuss.elastic.co/t/context-length-is-bigger-than-maximum-allowed-string/356985/4 "2024-04-08T22:08:46Z")

</div>

Thanks for following up. A workaround was suggested for a [GitHub issue](https://github.com/elastic/kibana/issues/173346) on this topic. You could try adding impacted fields to the "Field filter" from Stack Management \> Index Patterns \> "broker-server\*" page ("Field filters" tab), so Discover doesn't request them. Would something like this work?

I'm interested in learning more about your dataset. Do you have an example of the large Java stack you can share?

Thanks again!

---

<div class="post-metadata">

**Author:** ![amoghbarve](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@amoghbarve](https://discuss.elastic.co/u/amoghbarve)\
**Post date:** [May 30, 2024, 4:14am UTC](https://discuss.elastic.co/t/context-length-is-bigger-than-maximum-allowed-string/356985/5 "2024-05-30T04:14:49Z")

</div>

Wanted to know if you find fix for this ?
