Unable to increase shard allocation limit

Hello,

I am upgrading my ELK stack from 6.8 version to 7.5. While upgrading, I am getting following error in elasticsearch :

"Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [1207]/[1000] maximum shards open;"

I tried to increase the shard limit by adding below line in elasticsearch.yml file :

cluster.max_shards_per_node: 3000

But even after restarting the elasticsearch service, settings are not reflecting and it shows same error.

Thank You

Hi,

I think you are running into this problem: https://github.com/elastic/elasticsearch/issues/40803

Can you try to set the limit using the persistent settings API and then try if the error still occurs after restarting? https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html

Best regards
Wolfram

Hi Wolfram,

Tried these settings, but still it is not reflecting. Also, tried by restarting elasticsearch service.

Is there anyway to delete shards from backend ?

Thank You

Hi,

I don't know if you would really want to delete shards but depending on your setup you could reduce the number of shards:
If you have time-based indexes, e.g. daily you could reindex your indexes into weekly or monthly indexes: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html
If you have multiple primary shards for a single index you could shrink your index and thereby reducing the number of primary shards: https://www.elastic.co/guide/en/elasticsearch/reference/7.6/indices-shrink-index.html
If you have multiple replica shards you can change that while shrinking too by setting index.number_of_replicas.

Best regards
Wolfram

1 Like

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