# After adding "elasticsearch - nofile 65536" still not enough threads are allocated

**URL:** https://discuss.elastic.co/t/after-adding-elasticsearch-nofile-65536-still-not-enough-threads-are-allocated/74796
**Category:** Elasticsearch
**Created:** [February 12, 2017, 10:41am UTC](https://discuss.elastic.co/t/after-adding-elasticsearch-nofile-65536-still-not-enough-threads-are-allocated/74796 "2017-02-12T10:41:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)
#### Post date: [February 12, 2017, 10:41am UTC](https://discuss.elastic.co/t/after-adding-elasticsearch-nofile-65536-still-not-enough-threads-are-allocated/74796/1 "2017-02-12T10:41:21Z")

</div>

Hi everyone,

I am getting an error "max number of threads [1024] for user [elasticsearch] is too low, increase to at least [2048]"

I opened [this](https://www.elastic.co/guide/en/elasticsearch/reference/master/setting-system-settings.html#limits.conf) manual and tried the following:

After trying:  
"sudo su  
ulimit -n 65536  
su elasticsearch "  
I get an error:  
"This account is currently not available."

After trying to add "elasticsearch - nofile 65536" to /etc/security/limits.conf the problem doesnt move.

After trying to add  
"[Service]  
LimitMEMLOCK=infinity"  
to "/etc/systemd/system/elasticsearch.service.d/elasticsearch.conf" the file does not save.

currently I am stuck on starting the ES.

Will be grateful for any help,  
Many Thanks,  
Tomer Zaks.

---

<div class="post-metadata">

### Author: ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)
#### Post date: [February 12, 2017, 11:33am UTC](https://discuss.elastic.co/t/after-adding-elasticsearch-nofile-65536-still-not-enough-threads-are-allocated/74796/2 "2017-02-12T11:33:58Z")

</div>

You want `nproc`, not `nofile`, and you shouldn't increase it that high, 2048 like the message says will be plenty.

---

<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: [March 12, 2017, 11:34am UTC](https://discuss.elastic.co/t/after-adding-elasticsearch-nofile-65536-still-not-enough-threads-are-allocated/74796/3 "2017-03-12T11:34:13Z")

</div>

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