Welcome! Log In Create A New Profile

Advanced

Re: worker_rlimit_nofile is for total of all worker processes or single worker process?

May 15, 2017 11:18AM
I read through the source codes and find the limit should be applied to each worker process. Right ?

static void
ngx_worker_process_init(ngx_cycle_t *cycle, ngx_int_t worker)
{
// .....

if (ccf->rlimit_nofile != NGX_CONF_UNSET) {
rlmt.rlim_cur = (rlim_t) ccf->rlimit_nofile;
rlmt.rlim_max = (rlim_t) ccf->rlimit_nofile;

if (setrlimit(RLIMIT_NOFILE, &rlmt) == -1) {
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
"setrlimit(RLIMIT_NOFILE, %i) failed",
ccf->rlimit_nofile);
}
}
Subject Author Posted

worker_rlimit_nofile is for total of all worker processes or single worker process?

fengx May 15, 2017 09:22AM

Re: worker_rlimit_nofile is for total of all worker processes or single worker process?

fengx May 15, 2017 11:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 66
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready