title: Increase max open files for Ubuntu/Upstart (initctl)
body: <p>This is on an Ubuntu 12.04.3 LTS server.</p>
  
  <p>I've added the following to /etc/security/limits.conf (my Golang processes run as root):</p>
  
  <pre><code>*      hard   nofile   50000
  *      soft   nofile   50000
  root   hard   nofile   50000
  root   soft   nofile   50000
  </code></pre>
  
  <p>I've added the following to /etc/pam.d/common-session</p>
  
  <pre><code>session required pam_limits.so
  </code></pre>
  
  <p>I've added the following to /etc/sysctl.conf:</p>
  
  <pre><code>fs.file-max = 50000
  </code></pre>
  
  <p>Yet when I cat /proc/{PID}/limits, I get:</p>
  
  <pre><code>Limit                     Soft Limit           Hard Limit           Units     
  Max open files            1024                 4096                 files     
  </code></pre>
  
  <p>This happens <strong>only when I start the process from Upstart via sudo initctl start service_name</strong>. If I start the process myself, it acknowledges my settings.</p>
  
  <p>How do I fix this?</p>