Thousands of elasticsearch product indexes with 0 documents

Hey Guys,

We’re having an issue where one our Shopware instances is having troubles with elastic search.

The first one was where our shard size was not enough. We had to increase it to 80k.
(This client has about 130k products)

app@83f27v-magweb-cmbl:~$ curl -XGET http://127.0.0.1:9200/_cluster/health?pretty 
{
  "cluster_name" : "elasticsearch",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 13170,
  "active_shards" : 13170,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 39510,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 25.0
}

There are about 3200 indexes where only one has some data

health status index                                                   uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   sw6_product_1880ecf94e19415e809e33f2386a98b2_1661929037 LzsET04ZTcay3mbJUl5WNw   3   3          0            0       849b           849b
yellow open   sw6_product_1880ecf94e19415e809e33f2386a98b2_1661990505 eB9RIZTYQYCtOnn4IlYM6w   3   3          0            0       849b           849b
yellow open   sw6_product_1880ecf94e19415e809e33f2386a98b2_1661929033 zZI8S6D9S9mZ8a3wpGWXcw   3   3          0            0       849b           849b
yellow open   sw6_product_1880ecf94e19415e809e33f2386a98b2_1661890294 krzQLXiORZiqlNCweziGCA   3   3          0            0       849b           849b
yellow open   sw6_product_1880ecf94e19415e809e33f2386a98b2_1661890297 -xqpRHdNTT2EaO6y8DFNCg   3   3          0            0       849b           849b
yellow open   sw6_product_1880ecf94e19415e809e33f2386a98b2_1661929025 05n6LOXkTDqdcXlNPlMqTw   3   3          0            0       849b           849b
yellow open   sw6_product_1880ecf94e19415e809e33f2386a98b2_1661929029 J2E4Q_qeR96a0vHkVTIAkg   3   3          0            0       849b           849b
yellow open   sw6_product_1880ecf94e19415e809e33f2386a98b2_1661906382 g8N2Z0z9RSqoPlBQpnPy8A   3   3          0            0       849b           849b
yellow open   sw6_product_1880ecf94e19415e809e33f2386a98b2_1661929021 PRb6ymXzQymqxhzNy8OQqA   3   3          0            0       849b           849b
yellow open   sw6_product_1880ecf94e19415e809e33f2386a98b2_1661917049 jr02aC9QSM6_-5AHmFstwQ   3   3          0            0       849b           849b
yellow open   sw6_product_1880ecf94e19415e809e33f2386a98b2_1661929015 1St3Er0QRMasV_gAzPMCkA   3   3          0            0       849b           849b
yellow open   sw6_product_1880ecf94e19415e809e33f2386a98b2_1661885733 swKutWYDQkiw066D0WntqQ   3   3     865755       532402      390mb          390mb

I’ve already deleted all indexes, generated them again and the same issues remains.
I’ve also increased the heap size from 773mb to 2.9GB which helped alot with the search performance on the front end.

Any suggestions on how to fix this?