﻿---
title: Total number of shards for an index on a single node exceeded
description: Elasticsearch takes advantage of all available resources by distributing data (index shards) among the cluster nodes. You might want to influence this...
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/3296/troubleshoot/elasticsearch/increase-shard-limit
products:
  - Elasticsearch
---

# Total number of shards for an index on a single node exceeded
Elasticsearch takes advantage of all available resources by distributing data (index shards) among the cluster nodes.
You might want to influence this data distribution by configuring the [index.routing.allocation.total_shards_per_node](https://docs-v3-preview.elastic.dev/elastic/elasticsearch/tree/main/reference/elasticsearch/index-settings/total-shards-per-node#total-shards-per-node) index setting to a custom value (for example, `1` in case of a highly trafficked index). Various configurations limiting how many shards an index can have located on one node can lead to shards being unassigned, because the cluster does not have enough nodes to satisfy the index configuration.
To fix this issue, complete the following steps:
<tab-set>
  <tab-item title="Elastic Cloud Hosted">
    In order to get the shards assigned we’ll need to increase the number of shards that can be collocated on a node. We’ll achieve this by inspecting the configuration for the `index.routing.allocation.total_shards_per_node` [index setting](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-settings) and increasing the configured value for the indices that have shards unassigned.**Use Kibana**
    1. Log in to the [Elastic Cloud console](https://cloud.elastic.co?page=docs&placement=docs-body).
    2. On the **Hosted deployments** panel, click the name of your deployment.
       <note>
       If the name of your deployment is disabled your Kibana instances might be unhealthy, in which case contact [Elastic Support](https://support.elastic.co). If your deployment doesn’t include Kibana, all you need to do is [enable it first](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/3296/deploy-manage/deploy/elastic-cloud/access-kibana).
       </note>
    3. Open your deployment’s side navigation menu (placed under the Elastic logo in the upper left corner) and go to **Dev Tools > Console**.
       ![](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/3296/troubleshoot/images/elasticsearch-reference-kibana-console.png)

    1. Inspect the `index.routing.allocation.total_shards_per_node` [index setting](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-settings) for the index with unassigned shards:
       ```json
       ```
       The response will look like this:
       ```json
       {
         "my-index-000001": {
           "settings": {
             "index.routing.allocation.total_shards_per_node": "1" 
           }
         }
       }
       ```
    2. [Increase](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings) the value for the total number of shards that can be assigned on one node to a higher value:
       ```json

       {
         "index" : {
           "routing.allocation.total_shards_per_node" : "2" <1>
         }
       }
       ```
  </tab-item>

  <tab-item title="Self-managed">
    In order to get the shards assigned you can add more nodes to your Elasticsearch cluster and assing the index’s target tier [node role](/elastic/docs-content/pull/3296/manage-data/lifecycle/index-lifecycle-management/migrate-index-allocation-filters-to-node-roles#assign-data-tier) to the new nodes.To inspect which tier is an index targeting for assignment, use the [get index setting](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 will look like this:
    ```json
    {
      "my-index-000001": {
        "settings": {
          "index.routing.allocation.include._tier_preference": "data_warm,data_hot" 
        }
      }
    }
    ```
    Alternatively, if adding more nodes to the Elasticsearch cluster is not desired, inspecting the configuration for the `index.routing.allocation.total_shards_per_node` [index setting](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-settings) and increasing the configured value will allow more shards to be assigned on the same node.
    1. Inspect the `index.routing.allocation.total_shards_per_node` [index setting](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-settings) for the index with unassigned shards:
       ```json
       ```
       The response will look like this:
       ```json
       {
         "my-index-000001": {
           "settings": {
             "index.routing.allocation.total_shards_per_node": "1" 
           }
         }
       }
       ```
    2. [Increase](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings) the total number of shards that can be assigned on one node or reset the value to unbounded (`-1`):
       ```json

       {
         "index" : {
           "routing.allocation.total_shards_per_node" : -1
         }
       }
       ```
  </tab-item>
</tab-set>

<admonition title="Simplify monitoring with AutoOps" applies-to="{ ess:, ece:, eck:, self:, "serverless": "ga" }">
  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://docs-v3-preview.elastic.dev/elastic/docs-content/pull/3296/deploy-manage/monitor/autoops).
</admonition>