Dear list,
I have questions about content of the following error messages.
---</var/log/secure>--- dovecot-auth: PAM unable todlopen(/lib/security/pam_nologin.so) dovecot-auth: PAM [error:/lib/security/pam_nologin.so: cannot open shared object file: Too many open files] dovecot-auth: PAM adding faulty module:/lib/security/pam_nologin.so dovecot-auth: PAM _pam_load_conf_file: unable to open /etc/pam.d/system-auth dovecot-auth: PAM unable to dlopen(<*unknown module path*>) dovecot-auth: PAM [error: *unknown module path*>: cannot open shared object file: Too many open files] dovecot-auth: PAM adding faulty module: <*unknown module path*> dovecot-auth: PAM _pam_load_conf_file: unable to open /etc/pam.d/system-auth dovecot-auth: PAM _pam_load_conf_file: unable to open /etc/pam.d/system-auth dovecot-auth: PAM unable to dlopen(/lib/security/pam_deny.so) dovecot-auth: PAM [error:/lib/security/pam_deny.so: cannot open shared object file: Too many open files] dovecot-auth: PAM adding faulty module:/lib/security/pam_deny.so
---</var/log/maillog>---
dovecot: auth(default): pam(xxx@xxx.com,127.0.0.1): pipe() failed: Too many open files dovecot: auth(default): pam(xxx@xxx.com,127.0.0.1): pipe() failed: Too many open files
It seems that this is due to that there are files existed to open beyond its limitation.
Other information that could be relevant are as follows.
ulimit -n
1024
cat /proc/cat /var/run/dovecot/master.pid
/limits
cat: /proc/7273/limits: No such file or directory
lsof -p cat /var/run/dovecot/master.pid
| wc -l
29
ls /proc/pidof dovecot-auth
/fd | wc -l
1024
From the above result, dovecot-auth proccess opened 10243 files, and that seems to be the limit. So I expect that adding following lines into /etc/init.d/dovecot could be fix this issue.
vi /etc/init.d/dovecot
. /etc/init.d/functions
ulimit -n 4098 <-add test -x /usr/sbin/dovecot || exit 0 <-add
if [ -f /etc/sysconfig/dovecot ]; then . /etc/sysconfig/dovecot fi
Is my understanding right? Even if so, how could I verify what files are opened by dovecot-auth?
I would very much appreciate it if someone in this list could provide comments/suggestions.
Sincerely,