title: Changing number open files on ec2 instance
body: <p>I'm using 32bit Amazon Linux (Centos?). Per the blog <a href="http://gnufreakz.wordpress.com/2009/08/12/increase-ulimit-in-centos/" rel="nofollow">http://gnufreakz.wordpress.com/2009/08/12/increase-ulimit-in-centos/</a> I tried changing some parameters.</p>
  
  <p>I added the below line to /etc/sysctl.conf</p>
  
  <pre><code>fs.file-max = 65536
  </code></pre>
  
  <p>and ran sysctl -p</p>
  
  <p>I added the below line to /etc/security/limits.conf</p>
  
  <pre><code>*   hard    nofile  65536
  </code></pre>
  
  <p>No luck! After a restart, ulimit -a still gives me:</p>
  
  <pre><code>core file size          (blocks, -c) 0
  data seg size           (kbytes, -d) unlimited
  scheduling priority             (-e) 0
  file size               (blocks, -f) unlimited
  pending signals                 (-i) 26597
  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) 1024
  virtual memory          (kbytes, -v) unlimited
  file locks                      (-x) unlimited
  </code></pre>