# 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:** 1
**Showing post:** 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.

---

_[View the full topic](https://discuss.elastic.co/t/after-adding-elasticsearch-nofile-65536-still-not-enough-threads-are-allocated/74796)._
