# Can max document size for Json plugin be increased? Seems to be 32768 now

**URL:** <https://discuss.elastic.co/t/can-max-document-size-for-json-plugin-be-increased-seems-to-be-32768-now/300227>\
**Category:** Logstash\
**Created:** [March 21, 2022, 4:20pm UTC](https://discuss.elastic.co/t/can-max-document-size-for-json-plugin-be-increased-seems-to-be-32768-now/300227 "2022-03-21T16:20:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulov](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@paulov](https://discuss.elastic.co/u/paulov)\
**Post date:** [March 21, 2022, 4:20pm UTC](https://discuss.elastic.co/t/can-max-document-size-for-json-plugin-be-increased-seems-to-be-32768-now/300227/1 "2022-03-21T16:20:34Z")

</div>

When using a Json filter in a logstash pipeline, I run into a size problem. I get an error indicating a max size of 32769 (2^15):

:exception=\>#\<LogStash::Json::ParserError: Unexpected end-of-input in VALUE\_STRING  
at [Source: (byte)"{"fields":{},"level":"info","@timestamp":1647597990820,"message":"{"id":"c4590000-fdc0-da0b-2c67-08da08c6f119","created\_at":"2022-03-18T10:06:18.798Z","error":{"error":"","error\_description":""},"scanner\_information":{"hardware\_id":"PRMC3N-OEM-03-203048","certificate\_serial\_number":""},"document\_verification":{"overall\_status":"not\_passed","auto\_checks":{"error":{"error":"","error\_description":""},"calculated\_risk\_value":90,"document\_details":{""[truncated 15884 bytes]; line: 1, column: 32769]\>}

Does anyone know if I can increase the max size that the JSON plugin can deal with? can't find any information on this).

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 22, 2022, 1:02am UTC](https://discuss.elastic.co/t/can-max-document-size-for-json-plugin-be-increased-seems-to-be-32768-now/300227/2 "2022-03-22T01:02:15Z")

</div>

It is unclear where this limit comes from. See [this](https://github.com/logstash-plugins/logstash-filter-json/issues/42) issue about the limit being 4KB.

---

<div class="post-metadata">

**Author:** ![paulov](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@paulov](https://discuss.elastic.co/u/paulov)\
**Post date:** [March 23, 2022, 8:44pm UTC](https://discuss.elastic.co/t/can-max-document-size-for-json-plugin-be-increased-seems-to-be-32768-now/300227/3 "2022-03-23T20:44:26Z")

</div>

It finally turned out to be an error in the input data. The input data was indeed truncated and was thus not valid json. Strangely the truncated string was about 18000 bytes long, not 32769. However, maybe that value plays some role, the sending party may have a max document size somewhere (?).

---

<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:** [April 20, 2022, 8:45pm UTC](https://discuss.elastic.co/t/can-max-document-size-for-json-plugin-be-increased-seems-to-be-32768-now/300227/4 "2022-04-20T20:45:11Z")

</div>

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