Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On my centos 5.5 server,i set in limits.conf with bellow:

* soft nofile 409600
* hard nofile 409600

but when i issue command:ulimit -n. It tell me :

open files                      (-n) 1024

I had set fs.file-max=1188373 in /etc/sysctl.conf. I don't know where is wrong.Please help me! Thanks!

share|improve this question
So about cat /proc/sys/fs/file-max ? – cuonglm May 16 '13 at 10:05

Is there maybe some rule inside /etc/security/limits.d/ overriding your settings?

share|improve this answer
Do you try sysctl -p. Give the result of command ulimit -Hn and ulimit -Sn – cuonglm May 16 '13 at 9:51
It is empty in /etc/security/limits.d.@Pascal Schmiel – lyxing May 16 '13 at 9:54
have you re-logged in after you've set the new limits? – Pascal Schmiel May 16 '13 at 9:57
@Gnouc .sysctl -a|grep file :fs.file-max = 1188373 .ulimit -HSn :1024 – lyxing May 16 '13 at 9:57
The limits were set long long ago.I checked the mistake today. @Pascal Schmiel – lyxing May 16 '13 at 10:00

In case it is not just a mistake in the question, I'd suggest to put just fs.file-max=1188373 in /etc/sysctl.conf instead of prefixing this with set.

Then load it with sysctl -p /etc/sysctl.conf and check, as was already suggested, with cat /proc/sys/fs/file-max if it had any effect.

share|improve this answer
sysctl -a|grep file :fs.file-max = 1188373 . cat /proc/sys/fs/file-max 1188373 @Stefan Eggers – lyxing May 16 '13 at 10:37
cat /proc/sys/fs/file-max 1188373 – lyxing May 16 '13 at 10:39
OK, so that is working. Does /etc/pam.d/system-auth (probably a symlink to system-auth-ac) contain a line with in it? – Stefan Eggers May 16 '13 at 19:39

Your Answer


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.