I have a problem with open files under my Ubuntu 9.10 when running server in Python2.6 And main problem is that, that i don't know why it so..
I have set
ulimit -n = 999999
net.core.somaxconn = 999999
fs.file-max = 999999
and lsof gives me about 12000 open files when server is running.
And also i'm using epoll.
But after some time it's start giving exeption:
File "/usr/lib/python2.6/socket.py", line 195, in accept error: [Errno 24] Too many open files
And i don't know how it can reach file limit when it isn't reached.
Thanks for help)
Params that configure max open connections.
at /etc/sysctl.conf
add:
net.core.somaxconn=131072
fs.file-max=131072
and then:
sudo sysctl -p
at /usr/include/linux/limits.h
change:
NR_OPEN = 65536
at /etc/security/limits.conf
add:
* soft nofile 65535
* hard nofile 65535
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With