What's difference between worker_connections and worker_rlimit_nofile

worker_rlimit_nofile for file descriptors and worker_connections for
network connections?
If I am right, worker_rlimit_nofile must be larger than
worker_connections.

And, what’s the relationship between `ulimit -n’ and
worker_rlimit_nofile?


Ren Xiaolei

Hello!

On Sun, Mar 21, 2010 at 09:23:33PM +0800, 任晓磊 wrote:

worker_rlimit_nofile for file descriptors and worker_connections for
network connections?
If I am right, worker_rlimit_nofile must be larger than worker_connections.

worker_rlimit_nofiles adjusts system limit on number of open
files in nginx worker, while worker_connections is number of
connections nginx will allow.

System limit on number of open files must be larger than number of
worker_connections as any connection opens at least one file
(usually two - connection socket and either backend connection
socket or static file on disk).

And, what’s the relationship between `ulimit -n’ and worker_rlimit_nofile?

Via “ulimit -n” you may set the same system limit on number of
open files. It doesn’t really matter which method is used to set
limit (ulimit or worker_rlimit_nofile directive). Though
sometimes worker_rlimit_nofile is more convenient as it allows to
adjust limit without restarting nginx.

Maxim D.

On Mon, Mar 22, 2010 at 2:52 AM, Maxim D. [email protected]
wrote:

sometimes worker_rlimit_nofile is more convenient as it allows to
adjust limit without restarting nginx.

Thank you. I will add worker_rlimit_nofile into my nginx.conf file.

Ren Xiaolei

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs