Dovecot file descriptor limits and debian
One of our mail servers has recently reached the lastly set max IMAP connection limits and i had to increase the login_max_processes_count value again (see here). However, upon restart i go this error:
IMAP/POP3 mail server: dovecotWarning: fd limit 1024 is lower than what Dovecot can use under full load (more than 1512). Either grow the limit or change login_max_processes_count and max_mail_processes settings
Well, obvious this is about file descriptor limits. So, how do we increase this ? Cause this is not a daily task i had to look it up. You probably know or at least heard of ulimit. Beeing logged in a terminal, you can do the following:
#> ulimit -n 1024
This reads: your file descriptor limit (kind of: how many files can i open simultaneously) is 1024. Sounds familiar. Ok, but how can i set this for dovecot at startup ? Well, you could increase it in /etc/security/limits.conf and modify your pam files, but i think this is too much effort. One look in the dovecot init-script (/etc/init.d/dovecot) revealed that it uses the usual default file from /etc/default/dovecot.
So all you have to do is add the following line to “/etc/default/dovecot” (if not existing, create and chmod +x)
ulimit -n 2048
Thats all.
My Name is Ulrich Kautz and this is my private blog about server administration, perl programming and some other stuff that is on my mind. I study part-time computer sience at FU Berlin and work as sys admin and web developer at our hosting company