[ILUG] ls: Too many open files - pam_limit.so - ulimit

Brian Brazil bbrazil at netsoc.tcd.ie
Sun Feb 29 11:39:10 GMT 2004


Came across a Too many open files error a few times yesterday. Googling
revelaed that the problem was the file limit of ulimit which appears to
be per user.

I attempted to fix this using pam_limit adding 
*	soft	nofile		2048
*	hard	nofile		4096
to /etc/security/limits.conf and enabling pam_limit in ssh, cron and login
in pam.d.

However ulimit -a revealed no change. Adding the debug optin showed that
pam_limit claimed to be changing the value. I managed to change 'core'
with no problems.

ulimit -n 2048 works fine when in a root(ssh) shell. As whats is pushing
it over is a cron rsync of my homedir I need the setting to work for all
users - not just root.

Looking as /usr/src/linux/include/fs.h the default is 1024. I'd prefer
not to have to change that value there.

What am I doing wrong?

Also anyone know how to set MaxBytes to unlimited for MRTG? Couldn't
find anything on it on the web.

Thanks,
Brian



More information about the ILUG mailing list