# Update mapping is throttled while update index templates?

**URL:** <https://discuss.elastic.co/t/update-mapping-is-throttled-while-update-index-templates/177257>\
**Category:** Elasticsearch\
**Created:** [April 17, 2019, 9:56am UTC](https://discuss.elastic.co/t/update-mapping-is-throttled-while-update-index-templates/177257 "2019-04-17T09:56:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Todd](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Todd](https://discuss.elastic.co/u/Todd)\
**Post date:** [April 17, 2019, 9:56am UTC](https://discuss.elastic.co/t/update-mapping-is-throttled-while-update-index-templates/177257/1 "2019-04-17T09:56:39Z")

</div>

Hi!

when I update a lot of index templates, there are some data indexed into a new Index `Index-a`,so `Index-a` need to update mapping, but from the master node log, I found a lot of log like:

```auto
[2019-04-17T17:32:48,271][DEBUG][o.e.a.a.i.m.p.TransportPutMappingAction] [jssz-billions-es-01-masternode] failed to put mappings on indices [[[billions-bplus-raw_log-http-proxy-@2019.04.17-jssz01-0/rFFmavUZQjC40AU2dLwu0A]]], type [logs]
org.elasticsearch.cluster.metadata.ProcessClusterEventTimeoutException: failed to process cluster event (put-mapping) within 30s
[2019-04-17T17:32:48,283][DEBUG][o.e.a.a.i.m.p.TransportPutMappingAction] [jssz-billions-es-01-masternode] failed to put mappings on indices [[[billions-bplus-raw_log-http-proxy-@2019.04.17-jssz01-0/rFFmavUZQjC40AU2dLwu0A]]], type [logs]

```

when I shut the task of `update templates`, the mapping is successed updating.

So, update mapping will be throttled while update index templates?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 17, 2019, 11:34am UTC](https://discuss.elastic.co/t/update-mapping-is-throttled-while-update-index-templates/177257/2 "2019-04-17T11:34:55Z")

</div>

There's no _throttling_ here, but both templates and mappings are managed by the master so they are updated in sequence, and these updates will fail if they don't execute fast enough. Can you tell us a bit more about your cluster: how many nodes, and how many shards does it have? Are you using dedicated master nodes? How much data are you indexing and how often are you searching it?

---

<div class="post-metadata">

**Author:** ![Todd](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Todd](https://discuss.elastic.co/u/Todd)\
**Post date:** [April 18, 2019, 6:15am UTC](https://discuss.elastic.co/t/update-mapping-is-throttled-while-update-index-templates/177257/3 "2019-04-18T06:15:12Z")

</div>

the cluster info is:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/c/0cdc943f784a9549440ebaf99a145f4158e30e1f.png)  
and the three master nodes are dedicated.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 18, 2019, 6:18am UTC](https://discuss.elastic.co/t/update-mapping-is-throttled-while-update-index-templates/177257/4 "2019-04-18T06:18:44Z")

</div>

Thanks. I think you have too many shards, so the master is under too much pressure to keep up. You have an average of over 1200 shards per node, and the average shard size is under 400MB. Here is an article with some more information on how many shards you should have:

> **[How many shards should I have in my Elasticsearch cluster?
	  	 | Elastic](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster)**
>
> Elasticsearch is a very versatile platform, that supports a variety of use cases, and provides great flexibility around data organisation and replication strategies. This flexibility can however somet...

---

<div class="post-metadata">

**Author:** ![Todd](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Todd](https://discuss.elastic.co/u/Todd)\
**Post date:** [April 18, 2019, 6:22am UTC](https://discuss.elastic.co/t/update-mapping-is-throttled-while-update-index-templates/177257/5 "2019-04-18T06:22:53Z")

</div>

Ok, thanks! I will read it and optimising our cluster.😀

---

<div class="post-metadata">

**Author:** ![Todd](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Todd](https://discuss.elastic.co/u/Todd)\
**Post date:** [April 22, 2019, 2:55am UTC](https://discuss.elastic.co/t/update-mapping-is-throttled-while-update-index-templates/177257/6 "2019-04-22T02:55:01Z")

</div>

Hello,  
There is a new question for me, if the indexs are closed, will the amount of meta-information data of their shards decrease in the global cluster meta data?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 22, 2019, 9:13am UTC](https://discuss.elastic.co/t/update-mapping-is-throttled-while-update-index-templates/177257/7 "2019-04-22T09:13:45Z")

</div>

It's best to ask new questions on a new thread. Would you do that please?

---

<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:** [May 20, 2019, 9:13am UTC](https://discuss.elastic.co/t/update-mapping-is-throttled-while-update-index-templates/177257/8 "2019-05-20T09:13:46Z")

</div>

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