Max Shards Per Node Exceeded
Severity:
High
Elasticsearch Version:
8.5.0
Problem
Cluster refuses index creation due to exceeding maximum shards per node limit
Root Cause
Exceeded shard limit per node configured by index.max_shards_per_node setting
How to Detect
Symptoms
- Index creation failures with shard limit errors
- Cluster health shows yellow or red status
- Cluster stats indicate high shard count
Commands
GET _cluster/health
GET _cat/shards
GET _cluster/settings
Remediation Steps
- Identify indices with excessive shards
- Reduce shard count by reindexing or shrinking indices
- Adjust index.max_shards_per_node setting if appropriate
- Perform shard allocation reroute if necessary
Prevention
- Implement shard planning during index creation
- Set appropriate shard limits based on node capacity
- Monitor shard counts regularly
- Automate shard management policies
Production Example
curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d '{"persistent": {"index.max_shards_per_node": 1000}}'