# Problem with maxThreadCount and maxMergeCount

**URL:** <https://discuss.elastic.co/t/problem-with-maxthreadcount-and-maxmergecount/163599>\
**Category:** Elasticsearch\
**Created:** [January 9, 2019, 5:38pm UTC](https://discuss.elastic.co/t/problem-with-maxthreadcount-and-maxmergecount/163599 "2019-01-09T17:38:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![willyaranda\_vonage](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willyaranda_vonage/32/47191_2.png) [@willyaranda\_vonage](https://discuss.elastic.co/u/willyaranda_vonage)\
**Post date:** [January 9, 2019, 5:38pm UTC](https://discuss.elastic.co/t/problem-with-maxthreadcount-and-maxmergecount/163599/1 "2019-01-09T17:38:28Z")

</div>

Hi!

We are using curator to change the maxMergeCount to 1 when our indexes are in warm (spinning disks) machines.

Today, I've seen that we have an error:

2019-01-09 09:34:41,478 DEBUG elasticsearch log\_request\_fail:110 \< {"error":{"root\_cause":[{"type":"remote\_transport\_exception","reason":"[xxxx-node-xxx][ip:9300][indices:admin/settings/update]"}],"type":"illegal\_argument\_exception","reason":"maxThreadCount (= 10) should be \<= maxMergeCount (= 6)"},"status":400}

I'm trying to change both to 10 (so the condition match), but it sends me that error even with using curator.

Can you help me?

Thanks!

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [January 9, 2019, 5:52pm UTC](https://discuss.elastic.co/t/problem-with-maxthreadcount-and-maxmergecount/163599/2 "2019-01-09T17:52:33Z")

</div>

Do the warm nodes have fewer cores? This is a thread count issue, and it's telling you that 10 is too high for the number of cores/processors available. It appears that the maximum allowable on this box is 6.

---

<div class="post-metadata">

**Author:** ![willyaranda\_vonage](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willyaranda_vonage/32/47191_2.png) [@willyaranda\_vonage](https://discuss.elastic.co/u/willyaranda_vonage)\
**Post date:** [January 9, 2019, 5:57pm UTC](https://discuss.elastic.co/t/problem-with-maxthreadcount-and-maxmergecount/163599/3 "2019-01-09T17:57:20Z")

</div>

Hi!

This indexes are still on hot nodes, because there were not moved because this error. They have 32 cores (and 8 the warm ones).

Is there a fix where I can set everything to 1? If I try it, it gives me an error, even if this is the lowest value possible.

BTW, using ES 5.1.2

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [January 9, 2019, 6:14pm UTC](https://discuss.elastic.co/t/problem-with-maxthreadcount-and-maxmergecount/163599/4 "2019-01-09T18:14:46Z")

</div>

I would not recommend changing the `maxThreadCount`. Changing `maxMergeCount` is still not something I would recommend, but if you are doing that, I would not try to make it large at all, especially not if you have spinning disks. Too many concurrent merges is just not recommended, as the I/O load can be _very_ taxing.

---

<div class="post-metadata">

**Author:** ![willyaranda\_vonage](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willyaranda_vonage/32/47191_2.png) [@willyaranda\_vonage](https://discuss.elastic.co/u/willyaranda_vonage)\
**Post date:** [January 9, 2019, 6:21pm UTC](https://discuss.elastic.co/t/problem-with-maxthreadcount-and-maxmergecount/163599/5 "2019-01-09T18:21:54Z")

</div>

We are changing it just when our indexes are being moved from SSD to spinning, so we set them to 1, because there we force\_merge to get less segments.

The problem that we have is that it's set to 10 (we don't know why) today, and we cannot lower that value, and indexing seems to fail because of this.

Any clue to force the values to the default would be really helpful.

Thanks!

---

<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:** [February 6, 2019, 6:21pm UTC](https://discuss.elastic.co/t/problem-with-maxthreadcount-and-maxmergecount/163599/6 "2019-02-06T18:21:56Z")

</div>

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