Skip to content

Commit 3b0e39f

Browse files
bewalessfg
authored andcommitted
Add setting worker_rlimit_nofile (#164)
* Add setting worker_rlimit_nofile
1 parent a92d424 commit 3b0e39f

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ nginx_main_template:
335335
conf_file_location: /etc/nginx/
336336
user: nginx
337337
worker_processes: auto
338+
#worker_rlimit_nofile: 1024
338339
error_level: warn
339340
worker_connections: 1024
340341
http_enable: true

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ nginx_main_template:
146146
conf_file_location: /etc/nginx/
147147
user: nginx
148148
worker_processes: auto
149+
#worker_rlimit_nofile: 1024
149150
error_level: warn
150151
worker_connections: 1024
151152
http_enable: true

templates/nginx.conf.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ load_module modules/ngx_http_modsecurity_module.so;
3434
user {{ nginx_main_template.user }};
3535
worker_processes {{ nginx_main_template.worker_processes }};
3636

37+
{% if nginx_main_template.worker_rlimit_nofile is defined %}
38+
worker_rlimit_nofile {{ nginx_main_template.worker_rlimit_nofile }};
39+
{% endif %}
40+
3741
error_log /var/log/nginx/error.log {{ nginx_main_template.error_level }};
3842
pid /var/run/nginx.pid;
3943

0 commit comments

Comments
 (0)