# Data stream index template is resetting

**URL:** <https://discuss.elastic.co/t/data-stream-index-template-is-resetting/363307>\
**Category:** Elasticsearch\
**Created:** [July 17, 2024, 10:50pm UTC](https://discuss.elastic.co/t/data-stream-index-template-is-resetting/363307 "2024-07-17T22:50:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsheely](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsheely/32/135689_2.png) [@jsheely](https://discuss.elastic.co/u/jsheely)\
**Post date:** [July 17, 2024, 10:50pm UTC](https://discuss.elastic.co/t/data-stream-index-template-is-resetting/363307/1 "2024-07-17T22:50:19Z")

</div>

One of my data stream index templates settings and mappings keeps resetting to the default values and I can't figure out why

The primary setting I've changed is total\_fields limit from 2,000 to 10,000 but for some reason the settings revert back to 2,000 after a while. Typically during a rollover but not always

It is also resetting my custom mappings.

What is changing this back and how do I keep it from happening?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![nfeekery](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nfeekery/32/117349_2.png) [@nfeekery](https://discuss.elastic.co/u/nfeekery)\
**Post date:** [July 22, 2024, 1:30pm UTC](https://discuss.elastic.co/t/data-stream-index-template-is-resetting/363307/2 "2024-07-22T13:30:19Z")

</div>

From #Elastic Search to #Elasticsearch

---

<div class="post-metadata">

**Author:** ![jsheely](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsheely/32/135689_2.png) [@jsheely](https://discuss.elastic.co/u/jsheely)\
**Post date:** [August 4, 2024, 11:28pm UTC](https://discuss.elastic.co/t/data-stream-index-template-is-resetting/363307/3 "2024-08-04T23:28:14Z")

</div>

So for anyone else coming here from the C# world.

The problem is the Elastic Serilog Sink when Bootstrap is set to anything but None for DataStreams

The SDK does a lookup to see if a data stream template exists and unless it returns a status code 200 it will attempt to PUT a new template. Even if one already exists. Which this can happen if there is a network hiccup for whatever reason when it does the lookup.

There should be some Polly retry logic or additional checks in the event of a 502 error or something similar but at this time there is not.

References:

> <https://github.com/elastic/ecs-dotnet/blob/f10a76169f93be8d9a69b56c2547873b7eefbdef/src/Elastic.Ingest.Elasticsearch.CommonSchema/EcsDataStreamChannel.cs#L78>

> <https://github.com/elastic/elastic-ingest-dotnet/blob/fbcd631c6873b1a662b4984723326421bf20325f/src/Elastic.Ingest.Elasticsearch/ElasticsearchChannelBase.Bootstrap.cs#L90>

---

<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:** [September 1, 2024, 11:28pm UTC](https://discuss.elastic.co/t/data-stream-index-template-is-resetting/363307/4 "2024-09-01T23:28:38Z")

</div>

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