Wednesday, June 15, 2011

Too many open files in Linux systems when running FMW applications

This is the most common issue with linux system & you may notice the error message like 'Too many open files' while running SOA or WebCenter or OSB servers.

The solutions is to,

Edit /etc/security/limits.conf file & add below
<user> soft nofile 4096
<user> hard nofile 4096


Note - Replace <user> with actual os user name.
 

If you want to apply the above to all the user, then
* soft nofile 4096
* hard nofile 4096

Edit the /etc/pam.d/system-auth, and add this entry:
session required /lib/security/$ISA/pam_limits.so

Edit /etc/pam.d/login and add the below:
session required pam_limits.so

Adding "session required pam_limits.so" to /etc/pam.d/login and /etc/pam.d/sshd

Edit /etc/sysctl.conf file and put following line so that after reboot the setting will remain as it is:
# vi /etc/sysctl.conf
Append a config directive as follows:
fs.file-max = 100000

Try "sysctl -p" as root or Restart your machine.

After this change open a new terminal and issue ulimit -a.

No comments:

Post a Comment