Operating system limits
You may run into a situation in which NGINX does not perform as you expect. Either connections are being dropped or warning messages are printed in the log file. This is when it is important to know what limits your operating system may place on NGINX and how to tune them to get the best performance out of your server.
The area in which an e-mail proxy is most likely to run into problems is a connection limit. To understand what this means, you first have to know how NGINX handles client connections. The NGINX master process starts a number of workers, each of which runs as a separate process. Each process is able to handle a fixed number of connections, set by the worker_connections
directive. For each proxied connection, NGINX opens a new connection to the mail
server. Each of these connections requires a file descriptor and for each mail
server IP/port combination, a new TCP port is required from the ephemeral port range (see the following explanation).
Depending...