mail proxy (IMAP/POP3): balancing between workers
roland at spinnaker.de
Mon Jul 23 16:01:04 UTC 2018
I run NginX as mail proxy (IMAP/POP3) and have a setup with
I upgraded this setup from Linux 3.16 and NginX 1.10 to Linux 4.9 and
After this upgrade I run into trouble, since after reaching a maximum
of approximately 2600 proxied connections I run into the following
4096 worker_connections are not enough
4096 worker_connections are not enough while in http auth state
I found out, that nearly all connections were proxied by the first
worker process, while nearly all other worker processes seem to be
But I want to balance the connections between the workers, otherwise
the worker_rlimit_nofile and the worker_connections are too low.
As a first workaround I defined
which changed it's defaults in 0.11.3 from "on" to "off".
This seems to mitigate the issue for me (at least all worker processes
now use the CPU again according to ps output). I'm not sure, whether
the balancing is as good as with the old setup, but it looks much
better than before the workaround.
But what's the correct way to tell NginX, that it should balance the
connections between all worker processes? According to manual
"accept_mutex on" isend needed with EPOLLEXCLUSIVE which should be
active on my system with Linux 4.9 and glibc 2.24.
More information about the nginx