---
title: Total number of shards per node has been reached
description: Elasticsearch takes advantage of all available resources by distributing data (index shards) among the cluster nodes. You can influence the data distribution...
url: https://www.elastic.co/elastic/docs-builder/docs/2341/troubleshoot/elasticsearch/increase-cluster-shard-limit
products:
  - Elasticsearch
---

# Total number of shards per node has been reached
Elasticsearch takes advantage of all available resources by distributing data (index shards) among the cluster nodes.
You can influence the data distribution by configuring the [`cluster.routing.allocation.total_shards_per_node`](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/2341/reference/elasticsearch/index-settings/total-shards-per-node#cluster-total-shards-per-node) dynamic cluster setting to restrict the number of shards that can be hosted on a single node in the cluster.
In earlier Elasticsearch versions, `cluster.routing.allocation.total_shards_per_node` is set to `1000`. Reaching that limit causes the following error: `Total number of shards per node has been reached` and requires adjusting this setting or reducing the number of shards. In Elasticsearch 9.x, this setting is not configured by default, which means there is no upper bound on the number of shards per node unless the setting is explicitly defined.
Various configurations limiting how many shards can be hosted on a single node can lead to shards being unassigned, because the cluster does not have enough nodes to satisfy the configuration.
To ensure that each node carries a reasonable shard load, you might need to resize your deployment.
Follow these steps to resolve this issue:
1. [Check and adjust the cluster shard limit](#adjust-cluster-shard-limit) to determine the current value and increase it if needed.
2. [Determine which data tier needs more capacity](#determine-data-tier) to identify the tier where shards need to be allocated.
3. [Resize your deployment](#resize-deployment) to add capacity and accommodate additional shards.


## Check and adjust the cluster shard limit

The `cluster.routing.allocation.total_shards_per_node` setting controls the maximum number of shards that can be allocated to each node in a cluster. When this limit is reached, Elasticsearch cannot assign new shards to that node, leading to unassigned shards in your cluster.
By checking the current value and increasing it, you allow more shards to be collocated on each node, which might resolve the allocation issue without adding more capacity to your cluster.
You can run the following steps using either [API console](https://www.elastic.co/elastic/docs-builder/docs/2341/explore-analyze/query-filter/tools/console) or direct [Elasticsearch API](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/2341/reference/elasticsearch/rest-apis) calls.

### Check the current setting

Use the [get cluster-wide settings](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-get-settings) API to inspect the current value of `cluster.routing.allocation.total_shards_per_node`:
```json
```

The response looks like this:
```json
{
  "persistent": {
    "cluster.routing.allocation.total_shards_per_node": "300" 
  },
  "transient": {}
}
```


### Increase the setting

Use the [update the cluster settings](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings) API to increase the value to a higher number that accommodates your workload:
```json

{
  "persistent" : {
    "cluster.routing.allocation.total_shards_per_node" : 400 <1>
  }
}
```


## Determine which data tier needs more capacity

If increasing the cluster shard limit alone doesn't resolve the issue, or if you want to distribute shards more evenly, you need to identify which [data tier](https://www.elastic.co/elastic/docs-builder/docs/2341/manage-data/lifecycle/data-tiers) requires additional capacity.
Use the [get index settings](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-settings) API to retrieve the configured value for the `index.routing.allocation.include._tier_preference` setting:
```json
```

The response looks like this:
```json
{
  "my-index-000001": {
    "settings": {
      "index.routing.allocation.include._tier_preference": "data_warm,data_hot" 
    }
  }
}
```


## Resize your deployment

After you've identified the tier that needs more capacity, you can resize your deployment to distribute the shard load and allow previously unassigned shards to be allocated.
<applies-switch>
  <applies-item title="{ ess:, ece: }">
    To enable a new tier in your Elastic Cloud Hosted deployment, you edit the deployment topology to add a new data tier.
    1. In Kibana, open your deployment’s navigation menu (placed under the Elastic logo in the upper left corner) and go to **Manage this deployment**.
    2. From the right hand side, click to expand the **Manage** dropdown button and select **Edit deployment** from the list of options.
    3. On the **Edit** page, click on **+ Add Capacity** for the tier you identified you need to enable in your deployment. Choose the desired size and availability zones for the new tier.
    4. Navigate to the bottom of the page and click the **Save** button.
  </applies-item>

  <applies-item title="{ self: }">
    Add more nodes to your Elasticsearch cluster and assign the index’s target tier [node role](/elastic/docs-builder/docs/2341/manage-data/lifecycle/data-tiers#configure-data-tiers-on-premise) to the new nodes, by adjusting the configuration in `elasticsearch.yml`.
  </applies-item>

  <applies-item title="{ eck: }">
    Add more nodes to your Elasticsearch cluster and assign the index’s target tier [node role](/elastic/docs-builder/docs/2341/deploy-manage/distributed-architecture/clusters-nodes-shards/node-roles#change-node-role) to the new nodes, by adjusting the [node configuration](https://www.elastic.co/elastic/docs-builder/docs/2341/deploy-manage/deploy/cloud-on-k8s/node-configuration) in the `spec` section of your Elasticsearch resource manifest.
  </applies-item>
</applies-switch>

<admonition title="Simplify monitoring with AutoOps">
  AutoOps is a monitoring tool that simplifies cluster management through performance recommendations, resource utilization visibility, and real-time issue detection with resolution paths. Learn more about [AutoOps](https://www.elastic.co/elastic/docs-builder/docs/2341/deploy-manage/monitor/autoops).
</admonition>