Skip to content

Commit a6a70b4

Browse files
committed
add logic to ignore maxclients if maxrequestworkers is set
1 parent 102d459 commit a6a70b4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

manifests/mod/worker.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
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 maxreuestworkers is set, this value is ignored.
1112
#
1213
# @param minsparethreads
1314
# Minimum number of idle threads to handle request spikes.
@@ -40,6 +41,10 @@
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
#
4550
class apache::mod::worker (

templates/mod/worker.conf.erb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
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 %>
1110
<%- if @maxrequestworkers -%>
12-
MaxRequestWorkers <%= @maxrequestworkers %>
11+
MaxRequestWorkers <%= @maxrequestworkers %>
12+
<%- elsif @maxclients -%>
13+
MaxClients <%= @maxclients %>
1314
<%- end -%>
1415
</IfModule>

0 commit comments

Comments
 (0)