# Getting max bytes length exceeded exception error, how to fix and prevent?

**URL:** <https://discuss.elastic.co/t/getting-max-bytes-length-exceeded-exception-error-how-to-fix-and-prevent/163755>\
**Category:** Elasticsearch\
**Created:** [January 10, 2019, 2:11pm UTC](https://discuss.elastic.co/t/getting-max-bytes-length-exceeded-exception-error-how-to-fix-and-prevent/163755 "2019-01-10T14:11:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JimP](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@JimP](https://discuss.elastic.co/u/JimP)\
**Post date:** [January 10, 2019, 2:11pm UTC](https://discuss.elastic.co/t/getting-max-bytes-length-exceeded-exception-error-how-to-fix-and-prevent/163755/1 "2019-01-10T14:11:19Z")

</div>

How can I fix this, please? Also, using Logstash, and is there a way to prevent this going forward?

Elasticsearch 6.3.2  
Logstash 6.3.2

```
[2019-01-10T08:17:20,763][DEBUG][o.e.a.s.TransportSearchAction] [lmpau0629] [3259244] Failed to execute fetch phase
org.elasticsearch.transport.RemoteTransportException: [yyyyyy][10.xxx.xxx.xxx:9300][indices:data/read/search[phase/fetch/id]]
Caused by: org.elasticsearch.common.io.stream.NotSerializableExceptionWrapper: max_bytes_length_exceeded_exception: bytes can be at most 32766 in length; got 56515

```

==================================

All of the keyword fields have the ignore\_above setting.

```
    "message": {
      "type": "text",
      "fields": {
        "keyword": {
          "type": "keyword",
          "ignore_above": 256
        }
      }
    },
```

---

<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:** [February 7, 2019, 2:11pm UTC](https://discuss.elastic.co/t/getting-max-bytes-length-exceeded-exception-error-how-to-fix-and-prevent/163755/2 "2019-02-07T14:11:24Z")

</div>

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