# \[1\]: max number of threads \[2048\] for user \[elasticsearch\] is too low, increase to at least \[4096\]

**URL:** https://discuss.elastic.co/t/1-max-number-of-threads-2048-for-user-elasticsearch-is-too-low-increase-to-at-least-4096/146809
**Category:** Elasticsearch
**Created:** [August 31, 2018, 6:27am UTC](https://discuss.elastic.co/t/1-max-number-of-threads-2048-for-user-elasticsearch-is-too-low-increase-to-at-least-4096/146809 "2018-08-31T06:27:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![yuzhongzhu](https://avatars.discourse-cdn.com/v4/letter/y/9dc877/32.png) [@yuzhongzhu](https://discuss.elastic.co/u/yuzhongzhu)
#### Post date: [August 31, 2018, 6:27am UTC](https://discuss.elastic.co/t/1-max-number-of-threads-2048-for-user-elasticsearch-is-too-low-increase-to-at-least-4096/146809/1 "2018-08-31T06:27:18Z")

</div>

Hi,I install elasticsearch6.4 in **ubuntu** on docker, and I have set nproc to 4096, but I still get the error message "[1]: max number of threads [2048] for user [elasticsearch] is too low, increase to at least [4096]", Can someone help me, Thanks a lot.  
The following is my configuration.

root@vc2crtp2160109n:/home/anumber/docker-elk# docker images  
REPOSITORY TAG IMAGE ID CREATED SIZE  
[docker.elastic.co/kibana/kibana](http://docker.elastic.co/kibana/kibana) 6.4.0 a7e4cd1a7b45 13 days ago 666.9 MB  
[docker.elastic.co/elasticsearch/elasticsearch](http://docker.elastic.co/elasticsearch/elasticsearch) 6.4.0 1ac676545731 13 days ago 791.3 MB

root@vc2crtp2160109n:/home/anumber/docker-elk# cat /etc/security/limits.conf

elasticsearch soft memlock unlimited  
elasticsearch hard memlock unlimited  
elasticsearch - nofile 65536  
elasticsearch - nproc 4096  
root soft memlock unlimited  
root hard memlock unlimited  
root - nofile 65536  
root - nproc 4096

root@vc2crtp2160109n:/home/anumber/docker-elk# ulimit -a  
core file size (blocks, -c) 0  
data seg size (kbytes, -d) unlimited  
scheduling priority (-e) 0  
file size (blocks, -f) unlimited  
pending signals (-i) 63844  
max locked memory (kbytes, -l) 64  
max memory size (kbytes, -m) unlimited  
open files (-n) 1024  
pipe size (512 bytes, -p) 8  
POSIX message queues (bytes, -q) 819200  
real-time priority (-r) 0  
stack size (kbytes, -s) 8192  
cpu time (seconds, -t) unlimited  
**max user processes (-u) 4096**  
virtual memory (kbytes, -v) unlimited  
file locks (-x) unlimited

root@vc2crtp2160109n:/home/a632680/docker-elk# grep nproc /etc/security/\*  
/etc/security/limits.conf:# - nproc - max number of processes  
/etc/security/limits.conf:#@student hard nproc 20  
/etc/security/limits.conf:#@faculty soft nproc 20  
/etc/security/limits.conf:#@faculty hard nproc 50  
/etc/security/limits.conf:#ftp hard nproc 0  
/etc/security/limits.conf: **elasticsearch - nproc 4096**  
/etc/security/limits.conf: **root - nproc 4096**

---

<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 28, 2018, 6:27am UTC](https://discuss.elastic.co/t/1-max-number-of-threads-2048-for-user-elasticsearch-is-too-low-increase-to-at-least-4096/146809/2 "2018-09-28T06:27:29Z")

</div>

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