File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 88# The max number of simultaneous requests that will be served.
99# This is the old name and is still supported. The new name is
1010# MaxRequestWorkers as of 2.3.13.
11+ # If maxrequestworkers is set, this value is ignored.
1112#
1213# @param minsparethreads
1314# Minimum number of idle threads to handle request spikes.
4041# @param apache_version
4142# Used to verify that the Apache version you have requested is compatible with the module.
4243#
44+ # @param maxrequestworkers
45+ # Maximum number of connections that will be processed simultaneously
46+ # if set, maxclients is ignored
47+ #
4348# @see https://httpd.apache.org/docs/current/mod/worker.html for additional documentation.
4449#
4550class apache::mod::worker (
5358 Integer $threadlimit = 64,
5459 Integer $listenbacklog = 511,
5560 Optional[String] $apache_version = undef ,
61+ Optional[Integer] $maxrequestworkers = undef ,
5662) {
5763 include apache
5864 $_apache_version = pick($apache_version , $apache::apache_version )
Original file line number Diff line number Diff line change 113113 {
114114 serverlimit : 10 ,
115115 startservers : 11 ,
116- maxclients : 12 ,
116+ maxrequestworkers : 12 ,
117117 minsparethreads : 13 ,
118118 maxsparethreads : 14 ,
119119 threadsperchild : 15 ,
126126 it { is_expected . to contain_file ( '/etc/httpd/conf.modules.d/worker.conf' ) . with ( content : %r{^<IfModule mpm_worker_module>$} ) }
127127 it { is_expected . to contain_file ( '/etc/httpd/conf.modules.d/worker.conf' ) . with ( content : %r{^\s +ServerLimit\s +10$} ) }
128128 it { is_expected . to contain_file ( '/etc/httpd/conf.modules.d/worker.conf' ) . with ( content : %r{^\s +StartServers\s +11$} ) }
129- it { is_expected . to contain_file ( '/etc/httpd/conf.modules.d/worker.conf' ) . with ( content : %r{^\s +MaxClients\s +12$} ) }
129+ it { is_expected . to contain_file ( '/etc/httpd/conf.modules.d/worker.conf' ) . without ( content : %r{^\s +MaxClients} ) }
130+ it { is_expected . to contain_file ( '/etc/httpd/conf.modules.d/worker.conf' ) . with ( content : %r{^\s +MaxRequestWorkers\s +12$} ) }
130131 it { is_expected . to contain_file ( '/etc/httpd/conf.modules.d/worker.conf' ) . with ( content : %r{^\s +MinSpareThreads\s +13$} ) }
131132 it { is_expected . to contain_file ( '/etc/httpd/conf.modules.d/worker.conf' ) . with ( content : %r{^\s +MaxSpareThreads\s +14$} ) }
132133 it { is_expected . to contain_file ( '/etc/httpd/conf.modules.d/worker.conf' ) . with ( content : %r{^\s +ThreadsPerChild\s +15$} ) }
Original file line number Diff line number Diff line change 22 ServerLimit <%= @serverlimit %>
33 StartServers <%= @startservers %>
44 ThreadLimit <%= @threadlimit %>
5- MaxClients <%= @maxclients %>
65 MinSpareThreads <%= @minsparethreads %>
76 MaxSpareThreads <%= @maxsparethreads %>
87 ThreadsPerChild <%= @threadsperchild %>
98 MaxRequestsPerChild <%= @maxrequestsperchild %>
109 ListenBacklog <%= @listenbacklog %>
10+ <%- if @maxrequestworkers -%>
11+ MaxRequestWorkers <%= @maxrequestworkers %>
12+ <%- elsif @maxclients -%>
13+ MaxClients <%= @maxclients %>
14+ <%- end -%>
1115</ IfModule >
You can’t perform that action at this time.
0 commit comments