On May 5, 2011, at 10:52 AM, Reza Lotun wrote:
2011/5/5 Juan Antonio Ibañez Santorum <juanito1982@gmail.com> I had got the same problem using '-r epoll' options when starting the app via twistd... When 1024 descriptors are opened, I can see 100% CPU.
Any ideas?
1. Edit /etc/sysctl.conf and place the following line there: fs.file-max = 999999 2. Type $ sudo sysctl -p 3. Place the following two lines: * soft nofile 999999 * hard nofile 999999 Either reboot, or also type in `ulimit -n 999999` 4. Check that $ ulimit -a shows your open fixes set to 999999
There's nothing special about 999999 - it's just some big number conveniently bigger than 1024. Enjoy.
Reza
Would you mind opening a doc bug for explaining how to do this on multiple platforms, and maybe writing a lore doc about it? This is a really important tuning thing for anyone wanting to run even a medium-scale Twisted service. (Also, once again, the bug is <http://twistedmatrix.com/trac/ticket/816>, somebody please fix it :).) -glyph