Setting system-wide ulimits (esp. # of open files)
Hi!
I'm running Debian testing in conjunction with kernel 2.6.0. I've got an
application demanding up to 32000 sockets in certain circumstances. So, I
wanted to set the # of open file descriptors on a system-wide basis. I'm
using bash as the shell for all my user accounts.
Here's what I tried:
1. Look up the value of /proc/sys/fs/file-max just to be sure => yields
104849. So, that should be large enough.
2. Tried to modify the value for "ulimit -n" from the shell prompt as a
regular user => got "Operation not permitted"
3. a) Modified /etc/security/limits.conf so that it now contains the
following line:
* soft nofile 32000
b) Modified certain PAM-related files below /etc/pam.d so that they now
contain the line (the modification consisted of uncommenting the
according line)
session required pam_limits.so
I changed the following files:
/etc/pam.d/login
/etc/pam.d/su
c) However, after logging in from a different console, the command
"ulimit -a" still outputs:
open files (-n) 1024
4. Googling for "debian increasing ulimits" (and similar things) only
revealed that it's possible to *lower* a certain ulimit value as a
regular user (however, that's not what I want; I want to *increase* a
certain ulimit value, most notably the # of open file descriptors).
Any other ideas on what else I could try in order to increase the #
of open file descriptors to 32000 for all users and why the approach with
editing /etc/security/limits.conf didn't work (and what I could do to
get it to do what I want :-) )?
Thanks in advance for any hints/pointers!
Kind regards,
Holger
Reply to: