Skip to content

Commit

Permalink
feat: support disabling "worker_rlimit_nofile"
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorFTB authored Sep 1, 2024
1 parent 12d6b62 commit 557bba9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions spec/classes/nginx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,12 @@
value: 10_000,
match: 'worker_rlimit_nofile 10000;'
},
{
title: 'should not set worker_rlimit_nofile',
attr: 'worker_rlimit_nofile',
value: 0,
notmatch: %r{worker_rlimit_nofile}
},
{
title: 'should set pcre_jit',
attr: 'pcre_jit',
Expand Down
2 changes: 1 addition & 1 deletion templates/conf.d/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ daemon <%= @daemon %>;
user <%= @daemon_user %><% if @daemon_group -%> <%= @daemon_group %><% end -%>;
<% end -%>
worker_processes <%= @worker_processes %>;
<% if @worker_rlimit_nofile -%>
<% if @worker_rlimit_nofile > 0 -%>
worker_rlimit_nofile <%= @worker_rlimit_nofile %>;
<% end -%>
<% if @pcre_jit -%>
Expand Down

0 comments on commit 557bba9

Please sign in to comment.