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

we believe we have increased the max open file descriptors for the root user. This was done by adding this line to /etc/security/limits.conf:

*         -    nofile            2048

We think we've confirmed that the root user's limit was increased because we can tell (not described here) that our application (solr - which is run by root) has 1098 files open. However, we can't tell for sure how many open files the root user is allowed. We would expect this command to work, but it doesn't seem to be:

$ sudo -u root -s "ulimit -Sn"

Any ideas? Thanks!

share|improve this question
Are there any other entries for nofile in limits.conf? Maybe it's being overridden. What about possible parsing errors of limits.conf. Can you attach your entire file? – Andrew Case Sep 14 '11 at 22:17
Are you running selinux? What is the output from: ls -lZ /etc/security/limits.conf – Andrew Case Sep 14 '11 at 22:18
up vote 4 down vote accepted

Get the PID of the process that solr is running and then cat /proc/$SOLR_PID/limits -- this will tell you the actual limits of the process.

I'd recommend to run things like solr as a seperated unprivileged user. When doing this you have multiple options (limits.conf or add a ulimit -n 2048 to the init script, ...). The last one isn't all that shiny but works for quick settings and restarting the daemon

RANT: don't tell me you can't restart becauso you'll lose service. If that is the case you should have a HA setup anyway :)

share|improve this answer

After changing number of open files in /etc/security/limits.conf, user must log out and log back in to take effect. So, try this:

$ sudo su -
# ulimit -Sn
share|improve this answer

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.