We have an application that adds thousands of documents per second to our ES cluster. Each time we roll over the indices to which we are writing, and we start writing to new indices, we get the following errors, which don't allow ingesting documents for about 1 minute. After that 1 minute, everything goes back to normal until we rollover the index again.
[WARN ][o.e.c.s.MasterService ] [NODE_NAME_1] took [28.3s], which is over [10s], to compute cluster state update for [put-mapping[_doc, _doc, ...
[DEBUG][o.e.a.a.i.m.p.TransportPutMappingAction] [NODE_NAME_1] failed to put mappings on indices [[[INDEX_1/SOME_ID]]], type [_doc]
org.elasticsearch.cluster.metadata.ProcessClusterEventTimeoutException: failed to process cluster event (put-mapping) within 30s
at org.elasticsearch.cluster.service.MasterService$Batcher.lambda$onTimeout$0(MasterService.java:143) [elasticsearch-7.5.2.jar:7.5.2]
at java.util.ArrayList.forEach(ArrayList.java:1507) [?:?]
at org.elasticsearch.cluster.service.MasterService$Batcher.lambda$onTimeout$1(MasterService.java:142) [elasticsearch-7.5.2.jar:7.5.2]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:703) [elasticsearch-7.5.2.jar:7.5.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:830) [?:?]
In the first line, I put ellipsis at the end as it's actually quite large, here an image of what we're seeing (the line ends abruptly as you see in the image):
Do you know what those error messages are about?
Is it possible we are seeing those messages because of our cluster state being too large? Would that mean we have too many shards or nodes?
Thanks.
Note:
- We use ElasticSearch 7.5.2
- We don't use ILM, when I say "roll over our indices" what we do is to start writing to new indices that we created hours ago but were not using. Then we stop writing to the old indices.
