Advanced search - Elasticsearch migration halted before migrating to 15.11.4-ee

Recently, we wanted to migrate to version of GL 15.11.4-ee and in Advanced search, we discover an error Elasticsearch migration halted:

From Advanced search migrations, I checked when the last migration was successfully completed:

curl -s "http://localhost:9200/gitlab-production-migrations/_search?q=*"  | jq .hits.hits[0]
  "_index": "gitlab-production-migrations",
  "_id": "20230111142636",
  "_score": 1,
  "_source": {
    "completed": true,
    "state": {},
    "name": "AddInternalToNotes",
    "started_at": "2023-02-24T07:00:03.553Z",
    "completed_at": "2023-02-24T07:00:03.553Z"

From elasticsearch logs:

[2023-05-15T09:46:12,674][WARN ][o.e.t.LoggingTaskListener] [gl-advanced-search] 18016975 failed with exception
org.elasticsearch.common.util.concurrent.EsRejectedExecutionException: rejected execution of coordinating operation [coordinating_and_primary_bytes=0, replica_bytes=0, all_bytes=0, coordinating_operation_bytes=442971850, max_coordinating_and_primary_bytes=415655526]
	at org.elasticsearch.index.IndexingPressure.markCoordinatingOperationStarted( ~[elasticsearch-8.5.3.jar:?]
	at org.elasticsearch.action.bulk.TransportBulkAction.doExecute( ~[elasticsearch-8.5.3.jar:?]
	at org.elasticsearch.action.bulk.TransportBulkAction.doExecute( ~[elasticsearch-8.5.3.jar:?]
	at$RequestFilterChain.proceed( ~[elasticsearch-8.5.3.jar:?]
	at$Simple.apply( ~[elasticsearch-8.5.3.jar:?]
	at$RequestFilterChain.proceed( ~[elasticsearch-8.5.3.jar:?]
	at ~[elasticsearch-8.5.3.jar:?]
	at org.elasticsearch.tasks.TaskManager.registerAndExecute( ~[elasticsearch-8.5.3.jar:?]
	at org.elasticsearch.client.internal.node.NodeClient.executeLocally( ~[elasticsearch-8.5.3.jar:?]
	at org.elasticsearch.client.internal.node.NodeClient.doExecute( ~[elasticsearch-8.5.3.jar:?]
	at ~[elasticsearch-8.5.3.jar:?]
	at org.elasticsearch.client.internal.FilterClient.doExecute( ~[elasticsearch-8.5.3.jar:?]
	at org.elasticsearch.client.internal.ParentTaskAssigningClient.doExecute( ~[elasticsearch-8.5.3.jar:?]
	at ~[elasticsearch-8.5.3.jar:?]
	at ~[elasticsearch-8.5.3.jar:?]
	at org.elasticsearch.action.bulk.Retry$RetryHandler.execute( ~[elasticsearch-8.5.3.jar:?]
	at org.elasticsearch.action.bulk.Retry$RetryHandler.lambda$retry$3( ~[elasticsearch-8.5.3.jar:?]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ ~[elasticsearch-8.5.3.jar:?]
	at org.elasticsearch.threadpool.ThreadPool$ ~[elasticsearch-8.5.3.jar:?]
	at java.util.concurrent.Executors$ ~[?:?]
	at ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker( ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$ ~[?:?]
	at ~[?:?]

Its looks like ES has not enough memory. Current configuration is 4GB for HEAP. I found similar issue here Elasticsearch Bulk Index Requests Rejection but it does not work, because I could not set indexing_pressure.memory.limit for ES. From docs, it looks like the configuration is allowed only for Elasticsearch with paid plan. Then we increase memory to 8GB of HEAP and run migration. From logs, its looks its ok but index gitlab-production-migrations does not show any successful migration, the last one is still the with same id 20230111142636.

Current resources usage of ES is:

  • MEM: 4.6GB HEAP
  • Disk usage: 6.3G


  • Why is there no migration information in index gitlab-production-migrations? How to determine if migration has been completed?
  • 4.6G Heap for 6.3G data looks a lot. I cant imagine HEAP usage in case of larger indices. Is HEAP usage like this normal?
  • Why I could not change indexing_pressure.memory.limit ?
  • Is there better way how to solve this issue?
  • Does anybody have experience with rollover indices for gitlab? Right now, there are one index per commit, migration, users, etc… But this way, it will rising till the limit of ES.

Thank you in advance.