Skip to content

Commit eb7fccb

Browse files
ascii-soupjavierbertoli
authored andcommitted
Added "server_names_hash_max_size" parameter.
1 parent 838c20e commit eb7fccb

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

manifests/init.pp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@
149149
# [*keepalive_timeout*]
150150
# Specified keepalive timeout. Default is 65(ms).
151151
#
152+
# [*server_names_hash_max_size*]
153+
# Specified the server_names_hash_max_size. Default is 512
154+
# Increase this to powers of 2 if you are getting related errors
155+
#
152156
# [*server_names_hash_bucket_size*]
153157
# Specified the server_names_hash_bucket_size. Default is 64
154158
# Increase this to powers of 2 if you are getting related errors
@@ -234,8 +238,9 @@
234238
$gzip = params_lookup( 'gzip' ),
235239
$worker_connections = params_lookup( 'worker_connections' ),
236240
$keepalive_timeout = params_lookup( 'keepalive_timeout' ),
241+
$server_names_hash_max_size = params_lookup( 'server_names_hash_max_size' ),
237242
$server_names_hash_bucket_size = params_lookup( 'server_names_hash_bucket_size' ),
238-
$client_max_body_size = params_lookup( 'client_max_body_size' ),
243+
$client_max_body_size = params_lookup( 'client_max_body_size' ),
239244
$types_hash_max_size = params_lookup( 'types_hash_max_size' ),
240245
$sendfile = params_lookup( 'sendfile' ),
241246
$my_class = params_lookup( 'my_class' ),

manifests/params.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
$worker_connections = 1024
1919
$keepalive_timeout = 65
2020
$client_max_body_size = '10m'
21-
$server_names_hash_bucket_size =64
21+
$server_names_hash_max_size = 512
22+
$server_names_hash_bucket_size = 64
2223
$types_hash_max_size = 1024
2324
$sendfile = 'on'
2425

templates/conf.d/nginx.conf.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ http {
2222
tcp_nodelay on;
2323
client_max_body_size <%= scope.lookupvar('nginx::client_max_body_size')%>;
2424
keepalive_timeout <%= scope.lookupvar('nginx::keepalive_timeout')%>;
25+
server_names_hash_max_size <%= scope.lookupvar('nginx::server_names_hash_max_size')%>;
2526
server_names_hash_bucket_size <%= scope.lookupvar('nginx::server_names_hash_bucket_size')%>;
2627
types_hash_max_size <%= scope.lookupvar('nginx::types_hash_max_size') %>;
2728

0 commit comments

Comments
 (0)