title: Max number of threads for elasticsearch too low
body: <p>I have a fresh installation of Ubuntu 16.04 and I installed elasticsearch 5 on it. Now when I try to start elasticsearch using</p>
  
  <pre><code>/etc/init.d/elasticsearch start
  </code></pre>
  
  <p>After a few seconds in the log file I read: </p>
  
  <pre><code>[2016-11-19T08:47:31,442][ERROR][o.e.b.Bootstrap          ] [shooter-1] node validation exception
  bootstrap checks failed
  max number of threads [1891] for user [elasticsearch] likely too low, increase to at least [2048]
  </code></pre>
  
  <p>After some googling, I came to the conclusion that I had to add the following line to <code>/etc/security/limits.conf</code>:</p>
  
  <pre><code>elasticsearch    -       nproc           2048
  </code></pre>
  
  <p>However, even after this change, I still get the same error.</p>
  
  <p>I found a suggestion to uncomment the line <code>session    required   pam_limits.so</code> in <code>/etc/pam.d/su</code>, but that line was already uncommented.</p>
  
  <p>What am I missing?</p>