# \[doc\]\[xxxxx\], source\[n/a, actual length: \[5.1kb\], max length: 2kb\]}\]

**URL:** <https://discuss.elastic.co/t/doc-xxxxx-source-n-a-actual-length-5-1kb-max-length-2kb/130421>\
**Category:** Elasticsearch\
**Created:** [May 3, 2018, 10:01am UTC](https://discuss.elastic.co/t/doc-xxxxx-source-n-a-actual-length-5-1kb-max-length-2kb/130421 "2018-05-03T10:01:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![liweigao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liweigao/32/6736_2.png) [@liweigao](https://discuss.elastic.co/u/liweigao)\
**Post date:** [May 3, 2018, 10:01am UTC](https://discuss.elastic.co/t/doc-xxxxx-source-n-a-actual-length-5-1kb-max-length-2kb/130421/1 "2018-05-03T10:01:08Z")

</div>

Hello Everyone, I have a trouble.  
This is my logs

`[2018-05-03T16:47:04,105][DEBUG][o.e.a.b.TransportShardBulkAction] [sc_cms_api-2018.05.03][4] failed to execute bulk item (index) BulkShardRequest [[sc_cms_api-2018.05.03][4]] containing [index {[sc_cms_api-2018.05.03][doc][NXYuJWMBc68fiDfs88Wm], source[n/a, actual length: [5.1kb], max length: 2kb]}] org.elasticsearch.index.mapper.MapperParsingException: failed to parse [data.star] at org.elasticsearch.index.mapper.FieldMapper.parse(FieldMapper.java:302) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:485) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseObject(DocumentParser.java:500) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseNonDynamicArray(DocumentParser.java:584) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseArray(DocumentParser.java:542) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.innerParseObject(DocumentParser.java:396) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:384) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:482) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseObject(DocumentParser.java:500) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.innerParseObject(DocumentParser.java:394) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:384) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.internalParseDocument(DocumentParser.java:93) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:67) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:261) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:714) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.shard.IndexShard.applyIndexOperation(IndexShard.java:692) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.shard.IndexShard.applyIndexOperationOnPrimary(IndexShard.java:673) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.executeIndexRequestOnPrimary(TransportShardBulkAction.java:548) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.executeIndexRequest(TransportShardBulkAction.java:140) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.executeBulkItemRequest(TransportShardBulkAction.java:236) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.performOnPrimary(TransportShardBulkAction.java:123) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:110) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:72) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryShardReference.perform(TransportReplicationAction.java:1034) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryShardReference.perform(TransportReplicationAction.java:1012) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.action.support.replication.ReplicationOperation.execute(ReplicationOperation.java:103) ~[elasticsearch-6.2.3.jar:6.2.3] ... Caused by: java.lang.IllegalStateException: Can't get text on a START_OBJECT at 1:4018 at org.elasticsearch.common.xcontent.json.JsonXContentParser.text(JsonXContentParser.java:85) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.common.xcontent.support.AbstractXContentParser.textOrNull(AbstractXContentParser.java:237) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.TextFieldMapper.parseCreateField(TextFieldMapper.java:345) ~[elasticsearch-6.2.3.jar:6.2.3] at org.elasticsearch.index.mapper.FieldMapper.parse(FieldMapper.java:297) ~[elasticsearch-6.2.3.jar:6.2.3] ... 63 more`

Some of the data I have found are of type errors. Some say there is a length limit. From the log, it is too long. Is there any restriction on elasticsearch?  
help! thanks.

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [May 3, 2018, 4:07pm UTC](https://discuss.elastic.co/t/doc-xxxxx-source-n-a-actual-length-5-1kb-max-length-2kb/130421/2 "2018-05-03T16:07:51Z")

</div>

Hm, I think it's some kind of parsing issue with the document. Do you have a copy of a doc that causes this problem? This exception:

```auto
Can't get text on a START_OBJECT

```

Makes me think there is something malformed about the JSON. The exception about length is a red herring; when an IndexRequest is turned into a string for logging purposes, there's a limit on how large that string can be:

> <https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/action/index/IndexRequest.java#L562-L575>

That's just a safety feature, to prevent 100mb documents/bulk requests from blowing out the log with gigabytes of text as it serializes the entire document. It also saves a bunch of heap memory.

So you can ignore that exception, I think the real issue is that "Can't get text" exception.

---

<div class="post-metadata">

**Author:** ![liweigao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liweigao/32/6736_2.png) [@liweigao](https://discuss.elastic.co/u/liweigao)\
**Post date:** [May 4, 2018, 2:32am UTC](https://discuss.elastic.co/t/doc-xxxxx-source-n-a-actual-length-5-1kb-max-length-2kb/130421/3 "2018-05-04T02:32:21Z")

</div>

Thank you for your reply. I have found the problem. I did not specify mapping. The default text of the field is longer than the length.

---

<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:** [June 1, 2018, 2:39am UTC](https://discuss.elastic.co/t/doc-xxxxx-source-n-a-actual-length-5-1kb-max-length-2kb/130421/4 "2018-06-01T02:39:12Z")

</div>

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