Tuesday, June 19, 2012

Whats with the nofile?

Well, as with today, I faced a new issue - not really an issue - but more of an application requirement, in terms of configuration and performance.

We had need to increase the open files descriptor.

"Too many open files' error" - was the talk of the day.

Well here is how we solved it.

/etc/security/limits.conf , added two lines one for soft and another for hard.
user soft nofile 2048 (default 1024)
user hard nofile 65536 

Then, edited the following files under the /etc/pam.d directory for login, sshd, sudo - to check if the following entries are present.

session required pam_limits.so

Then verified with ulimit -Hn and -Sn options to see the changes reflect.

Sometimes a logoff or a system restart is required.

~Peace.

No comments :

Post a Comment