Add an option to automatically set worker_connections based on worker_rlimit_nofile
This commit is contained in:
parent
5119f64e5c
commit
bf7b5ebd81
4 changed files with 38 additions and 19 deletions
|
|
@ -29,9 +29,7 @@ worker_processes {{ $cfg.WorkerProcesses }};
|
|||
worker_cpu_affinity {{ $cfg.WorkerCPUAffinity }};
|
||||
{{ end }}
|
||||
|
||||
{{ if ne .MaxOpenFiles 0 }}
|
||||
worker_rlimit_nofile {{ .MaxOpenFiles }};
|
||||
{{ end }}
|
||||
worker_rlimit_nofile {{ $cfg.MaxWorkerOpenFiles }};
|
||||
|
||||
{{/* http://nginx.org/en/docs/ngx_core_module.html#worker_shutdown_timeout */}}
|
||||
{{/* avoid waiting too long during a reload */}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue