Unavailable_shards_exception, reason=index_xyz 0 primary shard is not active Timeout: 1m

I am using Elasticsearch 7 and it keeps throwing the below Error.
My application is just trying to push a document with index document_published_data.
For the same, I have created the BulkProcessor and using the bulk API to push the data on below condition -

BulkProcessor.Builder builder = BulkProcessor.builder(
				(request, bulkListener) ->
						client.bulkAsync(request, RequestOptions.DEFAULT, bulkListener),
				elasticsearchProcessor.getBulkProcessorListener(this));
builder.setBulkActions(50);
builder.setBulkSize(new ByteSizeValue(5, ByteSizeUnit.MB));

Reason: ElasticsearchException[Elasticsearch exception [type=unavailable_shards_exception, reason=[index_xyz][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[index_xyz][0]] containing [index {[index_xyz][_doc][document_xyz], source[n/a, actual length: [5.7kb], max length: 2kb]}]]]]

Does it have anything to do with configuration?
I think the below message is the issue and the max value has to be adjusted.

actual length: [5.7kb], max length: 2kb

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