# Size limit Scripted field? Request Entity Too Large

**URL:** <https://discuss.elastic.co/t/size-limit-scripted-field-request-entity-too-large/219317>\
**Category:** Kibana\
**Created:** [February 14, 2020, 6:53am UTC](https://discuss.elastic.co/t/size-limit-scripted-field-request-entity-too-large/219317 "2020-02-14T06:53:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PavolHocko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavolhocko/32/62682_2.png) [@PavolHocko](https://discuss.elastic.co/u/PavolHocko)\
**Post date:** [February 14, 2020, 6:53am UTC](https://discuss.elastic.co/t/size-limit-scripted-field-request-entity-too-large/219317/1 "2020-02-14T06:53:44Z")

</div>

Hi, I am using Kibana 7.6.0.

I am getting a 413 error (Request Entity Too Large) when I am trying to save my scripted filed.

Is there any size limit of Scripred field? I am trying to save 340 chars to this script. If I save my script separately it is working... so there is no problem with a script. Just with it's size. Any suggestions?

 ![kibanaScriptTooLarge](https://us1.discourse-cdn.com/elastic/original/3X/3/8/38866d471e182dc89c98085c8d774ed38817d6b0.png)

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [February 14, 2020, 8:56am UTC](https://discuss.elastic.co/t/size-limit-scripted-field-request-entity-too-large/219317/2 "2020-02-14T08:56:39Z")

</div>

The problem here is that Kibana will send the whole index pattern with all field definitions to the server if you change something, not just the changed part. If your index pattern contains a lot of fields, this can easily happen - seems like the new script is tipping it over the ege.

Try increasing the `server.maxPayloadBytes` setting in your `kibana.yml` file.

[https://www.elastic.co/guide/en/kibana/current/settings.html](https://www.elastic.co/guide/en/kibana/current/settings.html)

---

<div class="post-metadata">

**Author:** ![PavolHocko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavolhocko/32/62682_2.png) [@PavolHocko](https://discuss.elastic.co/u/PavolHocko)\
**Post date:** [February 14, 2020, 10:47am UTC](https://discuss.elastic.co/t/size-limit-scripted-field-request-entity-too-large/219317/3 "2020-02-14T10:47:40Z")

</div>

Thank you. This helped 🙂

---

<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:** [March 13, 2020, 10:47am UTC](https://discuss.elastic.co/t/size-limit-scripted-field-request-entity-too-large/219317/4 "2020-03-13T10:47:44Z")

</div>

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