title: could not open session as Root
body: <p>I came across this error that is apparently pretty common among Linux Systems.</p>
  
  <p>"Too many files Open"</p>
  
  <p>In my code I tried to set the Python open file limit to unlimited and it threw an error saying that I could not exceed the system limit. </p>
  
  <pre><code>import resource
  
  try:
      resource.setrlimit(resource.RLIMIT_NOFILE, (500,-1))
  except Exception as err:
      print err
      pass
  </code></pre>
  
  <p>So...I Googled around a bit and followed <a href="http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/#comment-56564" rel="nofollow">this tutorial</a>.</p>
  
  <p>However, I set everything to 9999999 which I thought would be as close to unlimited as I could get. Now I cannot open a session as root on that machine. I can't login as root at all and am pretty much stuck. What can I do to get this machine working again? I need to be able to login as root! I am running Centos 6 and it's as up to date as possible.</p>