Re: cannot login to imap under load
Hi Maria,
It does indeed run from systemd, so this is what's currently in the dovecot unit file ( /etc/systemd/system/dovecot.service ):
[Unit] Description=Dovecot IMAP/POP3 email server After=local-fs.target network.target
[Service] Type=simple ExecStart=/usr/sbin/dovecot -F NonBlocking=yes TasksMax=10000 LIMIT_NOFILE=10000
[Install] WantedBy=multi-user.target
Unfortunately, it doesn't seem to work... Best,
gerard
On 29-03-17 13:13, María Arrea wrote:
If you are running dovecot via systemd, increase NOFILES in the
dovecot startup script
El 29/03/17 a las 13:07, Gerard Ranke escribió:
Hi Steffen,
On 29-03-17 12:38, Steffen Kaiser wrote:
On Tue, 28 Mar 2017, Gerard Ranke wrote:
dovecot: master: Error: service(imap): fork() failed: Resource temporarily unavailable dovecot: master: Error: service(imap): command startup failed, throttling for 2 secs check out the ulimits for the Dovecot process.
-- Steffen Kaiser Here they are:
dovecot@mail:~> 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) 256942 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 10000 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) 256942 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
This looks ok to me, but on startup, I still get:
dovecot[9309]: Warning: fd limit (ulimit -n) is lower than required under max. load (1024 < 10000), because of service auth { client_limit }
Strange thing is that dovecot still complains about the fd limit being 1024, while I set it to 10000. And how can a ulimit be too low 'because of service auth'? I don't get that at all. Thanks for your interest!
gerard
Hello,
It does indeed run from systemd, so this is what's currently in the dovecot unit file ( /etc/systemd/system/dovecot.service ):
...
[Service] Type=simple ExecStart=/usr/sbin/dovecot -F NonBlocking=yes TasksMax=10000 LIMIT_NOFILE=10000
...
the parameter should be named
LimitNOFile=10000
(without the underscore), see http://man7.org/linux/man-pages/man7/systemd.directives.7.html and http://man7.org/linux/man-pages/man5/systemd.exec.5.html
--Andreas
On 2017-03-29 13:33:52 +0200, Piper Andreas wrote:
It does indeed run from systemd, so this is what's currently in the dovecot unit file ( /etc/systemd/system/dovecot.service ):
...
[Service] Type=simple ExecStart=/usr/sbin/dovecot -F NonBlocking=yes TasksMax=10000 LIMIT_NOFILE=10000
...
the parameter should be named
LimitNOFile=10000
(without the underscore), see http://man7.org/linux/man-pages/man7/systemd.directives.7.html and http://man7.org/linux/man-pages/man5/systemd.exec.5.html
Also you dont have to replace the whole service file to achieve this:
https://discourse.nordisch.org/t/per-service-ulimits/374
darix
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
On 29-03-17 14:40, Marcus Rueckert wrote:
On 2017-03-29 13:33:52 +0200, Piper Andreas wrote:
It does indeed run from systemd, so this is what's currently in the dovecot unit file ( /etc/systemd/system/dovecot.service ):
...
[Service] Type=simple ExecStart=/usr/sbin/dovecot -F NonBlocking=yes TasksMax=10000 LIMIT_NOFILE=10000
...
the parameter should be named
LimitNOFile=10000
(without the underscore), see http://man7.org/linux/man-pages/man7/systemd.directives.7.html and http://man7.org/linux/man-pages/man5/systemd.exec.5.html
Also you dont have to replace the whole service file to achieve this:
https://discourse.nordisch.org/t/per-service-ulimits/374
darix
Good point! I did remove the /etc/systemd/system/docevot.service file and added /etc/systemd/system/dovecot.service.d/limits.conf which reads:
[Service] TasksMax=10000 LimitNOFILE=10000
This should survive system upgrades as well. ( The TaskMax setting is to overcome the default 512 from a cgroup controller that is new for sles12sp2. )
After that it also needed: systemctl daemon-reload systemctl restart dovecot
Now dovecot starts up cleanly, and our performance problems are gone. Thank you all who took the time to answer, your remarks were very supporting and insightful! It's just what you need when you have a lot of users breathing down your neck :-) All the best!
gerard
participants (3)
-
Gerard Ranke
-
Marcus Rueckert
-
Piper Andreas