title: Apache Benchmark Error: Too Many Open Files
body: <p>I'm using apache benchmark to benchmark my localhost website but getting this error:</p>
  
  <pre><code>uday@uday-VirtualBox:/$ ab -n 2000 -c 2000 http://localhost/
  This is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt;
  Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  Licensed to The Apache Software Foundation, http://www.apache.org/
  
  Benchmarking localhost (be patient)
  socket: Too many open files (24)
  </code></pre>
  
  <p>I tried everything ulimit -n, changing file <code>/etc/sysctl.conf</code> for <code>fs.file-max = 700000</code>.
  This might help--</p>
  
  <pre><code> sysctl -a | grep file
   fs.file-nr = 6816  0   700000
   fs.file-max = 700000
  </code></pre>
  
  <p>I don't know what else to do I really want this to work my system RAM is 5GB.</p>