Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Aug 05, 2012 2:36 pm 
Offline
Newbie

Joined: Sun Aug 05, 2012 2:17 pm
Posts: 2
Hello all,

I'm stuck trying to increase my allowed file descriptors on Ubuntu 10.04. Searching the internet yields dozens of different instruction sets - I'm not sure which applies to my setup, and further, the three that I've tried have not worked.

I have tried:

* simply doing 'ulimit -n 65536'

* adding 'soft nofile 65536' 'hard nofile 65536' to /etc/security/limits.conf, uncommenting, 'session required pam_limits.so' from /etc/pam.d/su and rebooting

* Adding 'fs.file-max = 65536' to /etc/sysctl.conf, then running 'sysctl -p'

All get me nowhere. I'm running Apache / PyMongo -- without restarting Apache periodically Mongo is running out of file descriptors and crashing.

Any tips?

Thanks


Top
   
PostPosted: Wed Aug 08, 2012 1:33 pm 
Offline
Newbie

Joined: Sun Aug 05, 2012 2:17 pm
Posts: 2
For posterity, I've figured this one out:

1) The second method I described, actually works - but I was running as root and the rule "* soft nofile 65536" does not apply to root. Adding additional rules for root "root soft nofile 65536", "root hard nofile 65536" to /etc/security/limits.conf showed the change. Reboot was not required. Changing the limits for root wasn't strictly necessary for the problem I was having, but then it turns out, changing the limits at all wasn't required.....

2) The problem I was actually experiencing of mongo crashing due to lack of file descriptors was caused by bug is PyMongo 2.2. File descriptors were never being closed, so the crash is inevitable with enough time. See here: https://groups.google.com/forum/#!topic/mongodb-user/BOmqWeHw8tc%5B1-25%5D. PyMongo 2.2.1 fixes this issue.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: mattltm and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group