ArielGlenn has submitted this change and it was merged.
Change subject: labs: hardcode nginx types_hash_bucket_size to 64
......................................................................
labs: hardcode nginx types_hash_bucket_size to 64
On labs nginx refuse to start out:
Restarting nginx: nginx: [emerg] could not build the types_hash, you
should increase either types_hash_max_size: 1024 or
types_hash_bucket_size: 32
Nginx loads the mime type in a hash which has the mime name for keys,
one of the keys is 36 bytes long which does not fit the 32 bytes limit.
The limit itself is set by Nginx on startup and attempt to match the CPU
cache line. It does so by looking up the processor vendor / model and
set the name.
On labs that yield a value of 32 bytes which is used as a default values
for hash key size. The mime type hash thus can not hold one of the mime
entry which is 36 bytes long.
This patch set the mime key size to 64 bytes to bypass the nginx
detection and let it creates the mime type hash.
bug: 48210
Change-Id: Ieddf98ffae1a97aa1b533726453232a06f765bd2
---
M templates/nginx/nginx.conf.erb
1 file changed, 10 insertions(+), 0 deletions(-)
Approvals:
ArielGlenn: Looks good to me, approved
jenkins-bot: Verified
diff --git a/templates/nginx/nginx.conf.erb b/templates/nginx/nginx.conf.erb
index 5c94483..097bcf5 100644
--- a/templates/nginx/nginx.conf.erb
+++ b/templates/nginx/nginx.conf.erb
@@ -1,4 +1,8 @@
# This file is managed by Puppet!
+<%
+# Shortcuts for convenience
+realm = scope.lookupvar('::realm')
+-%>
# Thumbs server configuration file
@@ -24,6 +28,12 @@
}
http {
+<% if realm == 'labs' then -%>
+ # On labs nginx find a CPU cache size of 32 bytes which is
+ # not enough to hold the keys defined by mime types.
+ # See bug 48210
+ types_hash_bucket_size 64;
+<% end -%>
include /etc/nginx/mime.types;
access_log /var/log/nginx/access.log;
--
To view, visit https://gerrit.wikimedia.org/r/62603
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieddf98ffae1a97aa1b533726453232a06f765bd2
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits