Merge pull request #747 from Ensighten/add_events_accept_mutex_delay

Add events accept mutex delay
This commit is contained in:
James Fryman 2016-04-04 12:54:37 -05:00
commit f13fdc02a0
3 changed files with 24 additions and 0 deletions

View file

@ -43,6 +43,8 @@ class nginx::config(
### END Module/App Configuration ###
### START Nginx Configuration ###
$accept_mutex = 'on',
$accept_mutex_delay = '500ms',
$client_body_buffer_size = '128k',
$client_max_body_size = '10m',
$events_use = false,

View file

@ -124,6 +124,24 @@ describe 'nginx::config' do
:value => false,
:notmatch => /pid/,
},
{
:title => 'should set accept_mutex on',
:attr => 'accept_mutex',
:value => 'on',
:match => ' accept_mutex on;',
},
{
:title => 'should set accept_mutex off',
:attr => 'accept_mutex',
:value => 'off',
:match => ' accept_mutex off;',
},
{
:title => 'should set accept_mutex_delay',
:attr => 'accept_mutex_delay',
:value => '500s',
:match => ' accept_mutex_delay 500s;',
},
{
:title => 'should set worker_connections',
:attr => 'worker_connections',

View file

@ -22,6 +22,10 @@ error_log <%= @nginx_error_log %> <%= @nginx_error_log_severity %>;
<% end -%>
events {
accept_mutex <%= @accept_mutex %>;
<%- if @accept_mutex_delay -%>
accept_mutex_delay <%= @accept_mutex_delay %>;
<%- end -%>
worker_connections <%= @worker_connections -%>;
<%- if @multi_accept == 'on' -%>
multi_accept on;