# Max number of threads \[1024\] for user \[elasticsearch\] is too low

**URL:** <https://discuss.elastic.co/t/max-number-of-threads-1024-for-user-elasticsearch-is-too-low/95542>\
**Category:** Elasticsearch\
**Created:** [August 2, 2017, 2:07pm UTC](https://discuss.elastic.co/t/max-number-of-threads-1024-for-user-elasticsearch-is-too-low/95542 "2017-08-02T14:07:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aliyesami](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@aliyesami](https://discuss.elastic.co/u/aliyesami)\
**Post date:** [August 2, 2017, 2:07pm UTC](https://discuss.elastic.co/t/max-number-of-threads-1024-for-user-elasticsearch-is-too-low/95542/1 "2017-08-02T14:07:42Z")

</div>

I am using Centos and I start the elasticsearch as as service from root user .  
despite these settings I am still getting the warning of max number of threads too low.

I have put the following lines in the /etc/security/limits.conf

> elasticsearch - nofile 65536  
> root - nofile 65536

and in /etc/sysconfig/elasticsearch I have put the following

> MAX\_OPEN\_FILES=65536

and in /usr/lib/system/system/elasticsearch.service

> [root@hadoop1 ~]# grep LimitNOFILE /usr/lib/systemd/system/elasticsearch.service  
> LimitNOFILE=65536

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 4, 2017, 7:35am UTC](https://discuss.elastic.co/t/max-number-of-threads-1024-for-user-elasticsearch-is-too-low/95542/2 "2017-08-04T07:35:03Z")

</div>

The error message is not about the maximum number of open files, but about the number of threads that the user can spawn.

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [August 4, 2017, 7:42am UTC](https://discuss.elastic.co/t/max-number-of-threads-1024-for-user-elasticsearch-is-too-low/95542/3 "2017-08-04T07:42:02Z")

</div>

```
* soft nofile 655350
* hard nofile 655350
* hard nproc 655350
* soft nproc 655350
* hard nofile 500000
* soft nofile 500000
* hard stack 327680
* soft stack 102400

```

set link this.

---

<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, 2017, 8:56am UTC](https://discuss.elastic.co/t/max-number-of-threads-1024-for-user-elasticsearch-is-too-low/95542/5 "2017-09-01T08:56:52Z")

</div>

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