From dbc4077ba5abeaced91d99f55ef876584f55ed69 Mon Sep 17 00:00:00 2001 From: Nobuto Murata Date: Thu, 14 Oct 2021 09:54:46 +0900 Subject: [PATCH] Ease KeepAliveTimeout Apache2's default value for KeepAliveTimeout is 5 seconds, which is okay for general web-page serving use cases. However, connections from a web browser to Horizon application can be terminated unnecessarily during multiple requests in a session due to the short KeepAliveTimeout. Let's ease KeepAliveTimeout to 75 seconds, which is fairly standard for services behind a reverse proxy since it's the default value of nginx. Closes-Bug: #1947010 Change-Id: Iff9357e5efb7937927a8d0a6de072d4afaa98906 --- templates/default | 2 ++ templates/default-ssl | 2 ++ 2 files changed, 4 insertions(+) diff --git a/templates/default b/templates/default index 1ee4966f..4a4c38a3 100644 --- a/templates/default +++ b/templates/default @@ -34,4 +34,6 @@ CustomLog ${APACHE_LOG_DIR}/access.log combined + KeepAliveTimeout 75 + MaxKeepAliveRequests 1000 diff --git a/templates/default-ssl b/templates/default-ssl index 71c05e3d..e619b137 100644 --- a/templates/default-ssl +++ b/templates/default-ssl @@ -55,6 +55,8 @@ NameVirtualHost *:{{ 443 }} {% endif %} Header set X-XSS-Protection "1; mode=block" Header set X-Content-Type-Options "nosniff" + KeepAliveTimeout 75 + MaxKeepAliveRequests 1000 SSLOptions +StdEnvVars