Q9604

Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions
Clone this wiki locally

Q9604

Question

I get the too many open files error especially when a lot of messages land for Majordomo at the same time.

Answer

The problem appears to be the number of open files the system can handle. This is changable by using the proc filesystem. To your /etc/rc.d/rc.local file append something like the following:

# Now System is up, Modify kernel parameters for max open etc.

if [ -f /proc/sys/kernel/file-max ]; then
6384 >> /proc/sys/kernel/file-max
fi
if [ -f /proc/sys/kernel/inode-max ]; then
4576 >> /proc/sys/kernel/inode-max
fi
if [ -f /proc/sys/kernel/file-nr ]; then
160 >> /proc/sys/kernel/file-nr
fi

By echoing the value you want for file-max to the file file-max etc., you actually change the kernel parameters.