ArielGlenn has submitted this change and it was merged.

Change subject: Move connection limiting from gerrit's Jetty to Apache
......................................................................


Move connection limiting from gerrit's Jetty to Apache

Gerrit's Jetty floods logs with "Dispatched Failed" messages, once its
buffer for queued client connections gets full. Hence, we shift
connection limiting to apache and thereby keep Jetty's queued
connection buffers empty.

As we currently do not set gerrit's httpd.maxThreads, and that setting
comes with a 25 default, we limit apache to pass at most that many
connections to gerrit.

For now, we should never hit the limit of 500 queued connections for
gerrit, as apache only forwards 25 connections. We nevertheless don't
set httpd.maxQueued to 0, just to provide some guarding in case we
accidentally set up a gerrit instance that's directly hooked to the
net.

Bug: 47284
Change-Id: I8fd7aff8e34c11b975dadf85191da51fd700dc94
---
M templates/apache/sites/gerrit.wikimedia.org.erb
M templates/gerrit/gerrit.config.erb
2 files changed, 5 insertions(+), 0 deletions(-)

Approvals:
  ArielGlenn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/apache/sites/gerrit.wikimedia.org.erb 
b/templates/apache/sites/gerrit.wikimedia.org.erb
index 0f80ff0..d8c285c 100644
--- a/templates/apache/sites/gerrit.wikimedia.org.erb
+++ b/templates/apache/sites/gerrit.wikimedia.org.erb
@@ -6,6 +6,10 @@
 
 LogFormat "%h %l %u %t \"%r\" %>s %O T=%Ts \"%{Referer}i\" \"%{User-Agent}i\"" 
combined_time
 
+# Due to Jetty's connection limiting flooding logs with "Dispatched
+# Failed" Error messages, we limit connections already here.
+MaxClients 25
+
 NameVirtualHost *:80
 <VirtualHost *:80>
        ServerAdmin [email protected]
diff --git a/templates/gerrit/gerrit.config.erb 
b/templates/gerrit/gerrit.config.erb
index 394df21..ec11435 100644
--- a/templates/gerrit/gerrit.config.erb
+++ b/templates/gerrit/gerrit.config.erb
@@ -45,6 +45,7 @@
        idleTimeout = 864000
 [httpd]
        listenUrl = proxy-https://127.0.0.1:8080/r/
+       maxQueued = 500
 [cache]
        directory = cache
 [cache "web_sessions"]

-- 
To view, visit https://gerrit.wikimedia.org/r/50591
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fd7aff8e34c11b975dadf85191da51fd700dc94
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: QChris <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Ryan Lane <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to