# Error: Limit of total fields \[1000\] has been exceeded but index limit is higher

**URL:** https://discuss.elastic.co/t/error-limit-of-total-fields-1000-has-been-exceeded-but-index-limit-is-higher/350103
**Category:** Elasticsearch
**Created:** [December 28, 2023, 8:47pm UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-has-been-exceeded-but-index-limit-is-higher/350103 "2023-12-28T20:47:55Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![MColeman](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@MColeman](https://discuss.elastic.co/u/MColeman)
#### Post date: [December 28, 2023, 8:47pm UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-has-been-exceeded-but-index-limit-is-higher/350103/1 "2023-12-28T20:47:55Z")

</div>

I'm re-indexing some data from our old cluster into a new one. I pre-created my index (logstash-2023.10.02) and changed the total field mappings to 4000, the same as the old index on the old host.  
If I look at the new index settings I see the 4000 setting:

```auto
{
  "settings": {
    "index": {
      "routing": {
        "allocation": {
          "include": {
            "_tier_preference": "data_content"
          }
        }
      },
      "mapping": {
        "total_fields": {
          "limit": "4000"
        }

```

But when I try to re-index from the old cluster to the new it keeps throwing the 1000 limit error? Do I need to change something else somewhere or restart elasticsearch?  
Thanks!

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [December 28, 2023, 11:59pm UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-has-been-exceeded-but-index-limit-is-higher/350103/2 "2023-12-28T23:59:02Z")

</div>

@MColeman

Are you sure that is the index you are trying to write to?

---

<div class="post-metadata">

### Author: ![MColeman](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@MColeman](https://discuss.elastic.co/u/MColeman)
#### Post date: [December 29, 2023, 12:18am UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-has-been-exceeded-but-index-limit-is-higher/350103/3 "2023-12-29T00:18:39Z")

</div>

Hey Stephen! Here is my reindex command:

```auto
POST _reindex?pretty
{
  "source": {
    "remote": {
      "host": "http://remote_host:9200"
    },
    "index": "logstash-2023.10.02"
},
  "dest": {
    "index": "logtash-2023.10.02"
  }
}

```

so it was my understanding that it would just query that entire index from the remote\_host and put it all into the index\_name on the new host.

Thanks!

---

<div class="post-metadata">

### Author: ![MColeman](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@MColeman](https://discuss.elastic.co/u/MColeman)
#### Post date: [December 29, 2023, 12:19am UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-has-been-exceeded-but-index-limit-is-higher/350103/4 "2023-12-29T00:19:17Z")

</div>

I ran it from the dev tools console on the new host if that makes any difference

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [December 29, 2023, 12:26am UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-has-been-exceeded-but-index-limit-is-higher/350103/5 "2023-12-29T00:26:17Z")

</div>

How did you do this?

> [@MColeman](#):
>
> I pre-created my index (logstash-2023.10.02) and changed the total field mappings to 4000, the same as the old index on the old host.

And so when you run from the destination

`GET logtash-2023.10.02`

You see the correct settings?

What version cluster source &destination

Just for grins try using a different destination name just for a test that does not start with `logstash-`

---

<div class="post-metadata">

### Author: ![MColeman](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@MColeman](https://discuss.elastic.co/u/MColeman)
#### Post date: [December 29, 2023, 1:57am UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-has-been-exceeded-but-index-limit-is-higher/350103/6 "2023-12-29T01:57:55Z")

</div>

I created the index like this:

```auto
PUT /logstash-2023.10.02

```

and then

```auto
PUT logstash-2023.10.02/_settings
{
  "index.mapping.total_fields.limit":4000
}

```

The GET command looks correct

```auto
GET logstash-2023.10.02
{
  "logstash-2023.10.02": {
    "aliases": {},
    "mappings": {},
    "settings": {
      "index": {
        "routing": {
          "allocation": {
            "include": {
              "_tier_preference": "data_content"
            }
          }
        },
        "mapping": {
          "total_fields": {
            "limit": "4000"
          }
        },
        "number_of_shards": "1",
        "provided_name": "logstash-2023.10.02",
        "creation_date": "1703793290300",
        "number_of_replicas": "1",
        "uuid": "vT7d31JdQsa-upBAqeDtpA",
        "version": {
          "created": "8500003"
        }
      }
    }
  }
}

```

The source cluster (old) is linux 7.16.1 and the target (new) is Windows 8.11.3

Interestingly enough I did this:

```auto
PUT /test_index

PUT test_index/_settings
{
  "index.mapping.total_fields.limit":4000
}

GET test_index

POST _reindex?pretty
{
  "source": {
    "remote": {
      "host": "http://lxdev10:9200"
    },
    "index": "logstash-2023.10.02"
},
  "dest": {
    "index": "test_index"
  }
}

```

and received this

```auto
{
  "statusCode": 502,
  "error": "Bad Gateway",
  "message": "Client request timeout"
}

```

On the source that particular index is about 31GB  
Maybe what happened is I ran logstash on the new cluster and it created some logstash-\* indices and now I'm trying to move over older logstash indices with different mappings? Could that be it?

---

<div class="post-metadata">

### Author: ![MColeman](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@MColeman](https://discuss.elastic.co/u/MColeman)
#### Post date: [December 29, 2023, 1:59am UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-has-been-exceeded-but-index-limit-is-higher/350103/7 "2023-12-29T01:59:30Z")

</div>

I'll try this:  
stop logstash on the new cluster  
delete all the existing logstash\* indexes  
import the old indexes from the old cluster  
start logstash on the new cluster

---

<div class="post-metadata">

### Author: ![MColeman](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@MColeman](https://discuss.elastic.co/u/MColeman)
#### Post date: [January 2, 2024, 3:00pm UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-has-been-exceeded-but-index-limit-is-higher/350103/8 "2024-01-02T15:00:37Z")

</div>

Hey Stephen! I think I've solved this issue. I created indexes on the new cluster that are named legacy\_data and I'm re-indexing the old cluster logstash\* indexes into legacy\_data so as not to conflict with the existing logstash indexes.

The 502 Bad Gateway messages were coming from the dev console timing out. I switched to a shell script and have re-indexed my Oct-2023 old logstash data into the new cluster. Just a couple more months to re-index and I can throw that old cluster away.

Thanks!  
Mark

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 30, 2024, 3:01pm UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-has-been-exceeded-but-index-limit-is-higher/350103/9 "2024-01-30T15:01:06Z")

</div>

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