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

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

I am running Debian 6 and I am trying to increase the file descriptor limit but it does not want to work. This is what I have done:

I edited /etc/sysctl.conf by adding fs.file-max = 64000 at the end and applied the changes using sysctl -p.

I then edited /etc/security/limits.conf and added the following lines: * soft nofile 64000 and * hard nofile 64000.

Now when I execute ulimit -Hn and ulimit -Sn I still see 1024. I rebooted the server and I still get the same result. What have I failed to do?

share|improve this question
2… PS: No need to reboot after changing the /etc/security/limits.conf, just log out and log back in. – quanta Jul 27 '11 at 3:06
I did that too but I still get 1024 when executing ulimit -Hn and ulimit -Sn. Is this normal? If I changed the file descriptor hard and soft limit should it not give me the number I set it to? I am doing this because I run NGINX/PHP-FPM which is running low on descriptors. – Aco Jul 27 '11 at 4:17
I did not see the link you posted. It solved the problem. Thanks! +1 – Aco Jul 27 '11 at 5:11

grep -lr pam_limits /etc/pam.d?

If it's not return common-session, run the following command:

echo -e "session\trequired\t\" > /etc/pam.d/common-session

logging out and in again to see it works.

share|improve this answer
The command you did not work. But I do see /etc/pam.d/common-session in the directory pam.d directory. I'm not sure how that those commands will help, especially in Debian. – Aco Jul 27 '11 at 5:04

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.