Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have the following lines in /etc/security/limits.conf

*           soft        nofile          32768
*           hard        nofile          65536
root        soft        nofile          32768
root        hard        nofile          65536

The pam_limits.so file is required in each of the following files.

/etc/pam.d/common-session
/etc/pam.d/cron
/etc/pam.d/login
/etc/pam.d/sshd
/etc/pam.d/su
/etc/pam.d/sudo

ulimit -n upon login (and for services that are started upon bootup) shows 1024 still.

What am I missing?

share|improve this question

2 Answers

have you checked you don't have other config files in /etc/security/limits.d/?

Have you tried increasing it with ulimit?

$ ulimit -n 4096
$ ulimit -n
4096

And after saving you must log in again. It's not enough to start a shell, it must be a login shell.

share|improve this answer

For services in init.d you cannot use /etc/security/limits.d inittab is not reading that files and it is based on pam.d which is not used in initialization startup scripts. All init startup scripts source /etc/init.d/functions so for all services you could hack that script and set limits there. I used to hack /etc/sysconfig for particular services when I needed {httpd, some brokenass oracle stuf} e.t.c. Hope this helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.