title: How to increase Neo4j's maximum file open limit (ulimit) in Ubuntu?
body: <p>Currently <code>ulimit -n</code> shows <code>10000</code>. I want to increase it to <code>40000</code>. I've edited "/etc/sysctl.conf" and put <code>fs.file-max=40000</code>. I've also edited <code>/etc/security/limits.conf</code> and updated hard and soft values. But still ulimit shows <code>10000</code>. After making all these changes I rebooted my laptop. I've access to root password.</p>
  
  <pre><code>usr_name@usr_name-lap:/etc$ /sbin/sysctl fs.file-max
  fs.file-max = 500000
  </code></pre>
  
  <p>Added following lines in <code>/etc/security/limits.conf</code> -</p>
  
  <pre><code>*     soft    nofile          40000
  *     hard    nofile          40000
  </code></pre>
  
  <p>I also added following line in <code>/etc/pam.d/su</code>-</p>
  
  <pre><code>session    required   pam_limits.so
  </code></pre>
  
  <p>I've tried every possible way as given on other forums, but I can reach up to a maximum limit of <code>10000</code>, not beyond that. What can be the issue?</p>
  
  <p>I'm making this change because <code>neo4j</code> throws maximum open file limits reached error.</p>