1

Topic: Auth/Anvil: Too many open files in system

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.1
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: Downloadable installer
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Ubuntu 18.04.2 LTS
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello, I've tried many ways to increase process limits and file limits, but still I need restart dovecot service every 20 minutes. This in dovecot.log:

Oct 12 08:42:32 mail dovecot: anvil: Error: net_accept() failed: Too many open files in system
Oct 12 08:42:32 mail dovecot: master: Error: service(imap-login): command startup failed, throttling for 2 secs
Oct 12 08:42:33 mail dovecot: anvil: Error: net_accept() failed: Too many open files in system
Oct 12 08:42:34 mail dovecot: master: Error: service(imap-login): command startup failed, throttling for 2 secs
Oct 12 08:46:21 mail dovecot: auth: Error: net_accept() failed: Too many open files in system
Oct 12 08:46:21 mail dovecot: auth: Error: net_accept() failed: Too many open files in system
Oct 12 08:46:24 mail dovecot: anvil: Error: net_accept() failed: Too many open files in system
Oct 12 08:46:24 mail dovecot: master: Error: service(imap-login): command startup failed, throttling for 2 secs
Oct 12 08:46:26 mail dovecot: master: Error: service(imap-login): command startup failed, throttling for 4 secs
Oct 12 08:46:30 mail dovecot: master: Error: service(imap-login): command startup failed, throttling for 8 secs

ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 514397
max locked memory       (kbytes, -l) 16384
max memory size         (kbytes, -m) unlimited
open files                      (-n) 265535
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 265535
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

grep files /proc/$(pgrep -f 'dovecot -F')/limits
Max open files            1048576              1048576              files

2

Re: Auth/Anvil: Too many open files in system

Do you also run SOGo Groupware v5? Which version is it? Few OLD (v5) nightly builds had resource leaking issue, but should be fixed in latest nightly build, you can upgrade SOGo to fix it.

FYI: https://sogo.nu/bugs/view.php?id=5175

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

3

Re: Auth/Anvil: Too many open files in system

SOGo version has not been updated (4.3.2). We use roundcube and mail clients mostly.
I had to turn on the high perfomance mode on dovecot.conf to work stable for now.

4

Re: Auth/Anvil: Too many open files in system

ok, then sogo is not the cause.
Try this:

- create directory /etc/systemd/system/dovecot.service.d/
- create file /etc/systemd/system/dovecot.service.d/override.conf with content below:

[Service]
LimitNOFILE=infinity
TasksMax=infinity

- Run "systemctl daemon-reload && systemctl restart dovecot".

Then keep tracking this issue.

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee