My Elasticsearch cluster is going to yellow state in about every 15 min, becuase 2 replica shards are going to initialization state. After 5 mins or so, cluster is going back to green state.
Error Logs:
[o.e.t.OutboundHandler ] [SDV200000A] failed to serialize outbound message [Request{indices:data/write/bulk[s][r]}{19424480}{false}{false}{false}]
java.lang.IllegalArgumentException: ReleasableBytesStreamOutput cannot hold more than 2GB of data.
I checked the code also given in the stack trace
Caused by: java.lang.IllegalArgumentException: ReleasableBytesStreamOutput cannot hold more than 2GB of data
at org.elasticsearch.common.io.stream.BytesStreamOutput.ensureCapacity(BytesStreamOutput.java:175)
ensureCapacity() is taking long argument and comparing its value with int_MAX32.
To my understanding it looks like it creates pages during serialization process and the total size of those create pages is going more than 2gbs.
Can you please share your thoughts around this and what could be the possible reasons for this issue?
And why its specifically happening for replica shards not for the primary one?
No looks like that not the case here. We suspected this and also reduced our feeding batch size to 1GB but still happening.
Also if that would be the reason why its not happening on Primary shard, why only for replica shards.
1GiB is far too large for a single bulk request. The default limit for all HTTP requests is 100MiB, and the docs recommend you do not increase this. The primary may increase the sizes of the docs (e.g. via ingest pipelines).
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.