# Running out of fielddata without enabling it

**URL:** https://discuss.elastic.co/t/running-out-of-fielddata-without-enabling-it/102279
**Category:** Elasticsearch
**Created:** [September 29, 2017, 4:06pm UTC](https://discuss.elastic.co/t/running-out-of-fielddata-without-enabling-it/102279 "2017-09-29T16:06:43Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Maxwell\_Flanders](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@Maxwell\_Flanders](https://discuss.elastic.co/u/Maxwell_Flanders)
#### Post date: [September 29, 2017, 4:06pm UTC](https://discuss.elastic.co/t/running-out-of-fielddata-without-enabling-it/102279/1 "2017-09-29T16:06:43Z")

</div>

I have read that field data is disabled by default on text fields now. I recently experienced a field data related crash, but we have not even explicitly enabled it in any of our mappings. Are there other ways that elasticsearch could be using field data at any given time??

We are using elasticsearch 5.6

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 1, 2017, 10:07pm UTC](https://discuss.elastic.co/t/running-out-of-fielddata-without-enabling-it/102279/2 "2017-10-01T22:07:33Z")

</div>

> [@Maxwell\_Flanders](#):
>
> I recently experienced a field data related crash

How do you know this?

> [@Maxwell\_Flanders](#):
>
> Are there other ways that elasticsearch could be using field data at any given time??

What does `_cat/fielddata` show?

---

<div class="post-metadata">

### Author: ![Maxwell\_Flanders](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@Maxwell\_Flanders](https://discuss.elastic.co/u/Maxwell_Flanders)
#### Post date: [October 1, 2017, 11:47pm UTC](https://discuss.elastic.co/t/running-out-of-fielddata-without-enabling-it/102279/3 "2017-10-01T23:47:56Z")

</div>

```
curl IPADDRESS:9200/_cat/fielddata:
QwUELir0Sn24kggnuEHU8w IPADDRESS IPADDRESS DATA_NODE_NAME _uid 6.8gb
bRuBIe6fS2qtHmLHQnJpkQ IPADDRESS IPADDRESS DATA_NODE_NAME _uid 7.4gb
NAdsL0VfQwezpdZVHU01gQ IPADDRESS IPADDRESS DATA_NODE_NAME _uid 7gb
Yg9WcZOhQhWCQ6PG6UHP3g IPADDRESS IPADDRESS DATA_NODE_NAME _uid 7gb
tu8ioPFvQYGU1uJ6OQRrwg IPADDRESS IPADDRESS DATA_NODE_NAME _uid 7gb
```

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 2, 2017, 12:39am UTC](https://discuss.elastic.co/t/running-out-of-fielddata-without-enabling-it/102279/4 "2017-10-02T00:39:26Z")

</div>

What sort of data is it? What does the mapping look like?

---

<div class="post-metadata">

### Author: ![Maxwell\_Flanders](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@Maxwell\_Flanders](https://discuss.elastic.co/u/Maxwell_Flanders)
#### Post date: [October 2, 2017, 2:49pm UTC](https://discuss.elastic.co/t/running-out-of-fielddata-without-enabling-it/102279/5 "2017-10-02T14:49:49Z")

</div>

Apologize, I didn't see your first question about how we knew it, the cluster didnt actually crash, we started seeing queries fail because we were out of fielddata, and we knew because our application was throwing the error `Error: fielddata too large`. We cleared the fielddata cache and everything returned to normal. We are already looking at setting smarter values for our field data cache size and breaker values.

I didn't realize that the fielddata gave a breakdown by actual field, however all of these usages point to the "\_uid" field, which is not even a field that exists in our mapping.

It is metadata, things like file names and permissions.

this is the mapping:

---

<div class="post-metadata">

### Author: ![Maxwell\_Flanders](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@Maxwell\_Flanders](https://discuss.elastic.co/u/Maxwell_Flanders)
#### Post date: [October 2, 2017, 2:49pm UTC](https://discuss.elastic.co/t/running-out-of-fielddata-without-enabling-it/102279/6 "2017-10-02T14:49:55Z")

</div>

```
{
  "assets_v1" : {
    "mappings" : {
      "asset" : {
        "properties" : {
          "bc_asset_id" : {
            "type" : "keyword"
          },
          "checksum" : {
            "type" : "keyword"
          },
          "created_date" : {
            "type" : "long"
          },
          "directory_owner_composite_name" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 10000
              }
            }
          },
          "directory_owner_display_name" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 10000
              },
              "keyword_lowercase" : {
                "type" : "keyword",
                "ignore_above" : 10000,
                "normalizer" : "keyword_lowercase"
              }
            }
          },
          "directory_owner_email" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 10000
              }
            }
          },
          "directory_owner_external_id" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 10000
              }
            }
          },
          "directory_owner_is_deleted" : {
            "type" : "boolean"
          },
          "directory_owner_type" : {
            "type" : "long"
          },
          "download_url" : {
            "type" : "keyword"
          },
          "external_asset_id" : {
            "type" : "keyword"
          },
          "file_size_bytes" : {
            "type" : "long"
          },
          "ingestion_timestamp" : {
            "type" : "long"
          },
          "integration_id" : {
            "type" : "keyword"
          },
          "is_deleted" : {
            "type" : "boolean"
          },
          "is_directory" : {
            "type" : "boolean"
          },
          "max_visibility" : {
            "type" : "long"
          },
          "mime_type" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 10000
              },
              "keyword_lowercase" : {
                "type" : "keyword",
                "ignore_above" : 10000,
                "normalizer" : "keyword_lowercase"
              }
            }
          },
          "org_unit_name" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 10000
              },
              "keyword_lowercase" : {
                "type" : "keyword",
                "ignore_above" : 10000,
                "normalizer" : "keyword_lowercase"
              }
            }
          },
          "permission_entities" : {
            "type" : "nested",
            "properties" : {
              "bc_permission_id" : {
                "type" : "keyword"
              },
              "external_permission_id" : {
                "type" : "keyword"
              },
              "is_downloadable" : {
                "type" : "boolean"
              },
              "is_restricted" : {
                "type" : "boolean"
              },
              "shared_directory_composite_name" : {
                "type" : "text",
                "fields" : {
                  "keyword" : {
                    "type" : "keyword",
                    "ignore_above" : 10000
                  }
                }
              },
              "shared_directory_display_name" : {
                "type" : "text",
                "fields" : {
                  "keyword" : {
                    "type" : "keyword",
                    "ignore_above" : 10000
                  },
                  "keyword_lowercase" : {
                    "type" : "keyword",
                    "ignore_above" : 10000,
                    "normalizer" : "keyword_lowercase"
                  }
                }
              },
              "shared_directory_email" : {
                "type" : "text",
                "fields" : {
                  "keyword" : {
                    "type" : "keyword",
                    "ignore_above" : 10000
                  }
                }
              },
              "shared_directory_owner_type" : {
                "type" : "long"
              },
              "shared_directory_target_id" : {
                "type" : "keyword"
              },
              "type" : {
                "type" : "long"
              },
              "visibility_level" : {
                "type" : "long"
              }
            }
          },
          "provider_id" : {
            "type" : "keyword"
          },
          "raw" : {
            "type" : "text"
          },
          "relative_path" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 10000
              },
              "keyword_lowercase" : {
                "type" : "keyword",
                "ignore_above" : 10000,
                "normalizer" : "keyword_lowercase"
              }
            }
          },
          "tenant_id" : {
            "type" : "keyword"
          },
          "title" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 10000
              },
              "keyword_lowercase" : {
                "type" : "keyword",
                "ignore_above" : 10000,
                "normalizer" : "keyword_lowercase"
              }
            }
          },
          "updated_date" : {
            "type" : "long"
          }
        }
      }
    }
  }
}
```

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 2, 2017, 10:15pm UTC](https://discuss.elastic.co/t/running-out-of-fielddata-without-enabling-it/102279/7 "2017-10-02T22:15:29Z")

</div>

`_uid` = [https://www.elastic.co/guide/en/elasticsearch/reference/5.6/mapping-uid-field.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/mapping-uid-field.html)

What do the queries look like?

---

<div class="post-metadata">

### Author: ![Maxwell\_Flanders](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@Maxwell\_Flanders](https://discuss.elastic.co/u/Maxwell_Flanders)
#### Post date: [October 3, 2017, 9:38pm UTC](https://discuss.elastic.co/t/running-out-of-fielddata-without-enabling-it/102279/8 "2017-10-03T21:38:18Z")

</div>

We found the issue, thank you @warkolm!! The queries were not the issue, however it turns out we were sorting on \_uid. We were able to change our sorts to be on a different field without affecting anything else and our fielddata usage dropped to 0.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 3, 2017, 10:27pm UTC](https://discuss.elastic.co/t/running-out-of-fielddata-without-enabling-it/102279/9 "2017-10-03T22:27:26Z")

</div>

Thanks for sharing the solution!

---

<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: [October 31, 2017, 10:27pm UTC](https://discuss.elastic.co/t/running-out-of-fielddata-without-enabling-it/102279/10 "2017-10-31T22:27:38Z")

</div>

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