From 822074576da473f65bc4e19f149a611673a3bb64 Mon Sep 17 00:00:00 2001 From: Mizunashi Mana Date: Mon, 21 Mar 2016 06:17:25 +0900 Subject: [PATCH 1/3] add GITLAB_WORKHORSE_TIMEOUT env --- assets/build/install.sh | 1 + assets/runtime/env-defaults | 2 ++ assets/runtime/functions | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/build/install.sh b/assets/build/install.sh index 8608ba69..bbbb4301 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -253,6 +253,7 @@ command=/usr/local/bin/gitlab-workhorse -authBackend http://127.0.0.1:8080{{GITLAB_RELATIVE_URL_ROOT}} -authSocket ${GITLAB_INSTALL_DIR}/tmp/sockets/gitlab.socket -documentRoot ${GITLAB_INSTALL_DIR}/public + -proxyHeadersTimeout {{GITLAB_WORKHORSE_TIMEOUT}} user=git autostart=true autorestart=true diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index 46e536ba..da73f77e 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -90,6 +90,8 @@ if [[ -z ${GITLAB_MAX_OBJECT_SIZE} ]]; then fi fi +GITLAB_WORKHORSE_TIMEOUT=${GITLAB_WORKHORSE_TIMEOUT:-1m0s} + ## ARTIFACTS GITLAB_ARTIFACTS_ENABLED=${GITLAB_ARTIFACTS_ENABLED:-true} GITLAB_ARTIFACTS_DIR="${GITLAB_ARTIFACTS_DIR:-$GITLAB_SHARED_DIR/artifacts}" diff --git a/assets/runtime/functions b/assets/runtime/functions index 40ab928b..67fe358d 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -267,7 +267,9 @@ gitlab_configure_redis() { gitlab_configure_gitlab_workhorse() { echo "Configuring gitlab::gitlab-workhorse..." - update_template /etc/supervisor/conf.d/gitlab-workhorse.conf GITLAB_RELATIVE_URL_ROOT + update_template /etc/supervisor/conf.d/gitlab-workhorse.conf \ + GITLAB_RELATIVE_URL_ROOT \ + GITLAB_WORKHORSE_TIMEOUT } gitlab_configure_unicorn() { From 943266ddc1177c9fe61df0f3c0078cad8d9df303 Mon Sep 17 00:00:00 2001 From: Mizunashi Mana Date: Mon, 21 Mar 2016 06:19:48 +0900 Subject: [PATCH 2/3] add details on README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 118cd0b7..ee779a84 100644 --- a/README.md +++ b/README.md @@ -927,6 +927,7 @@ Below is the complete list of available options that can be used to customize yo - **RACK_ATTACK_MAXRETRY**: Number of failed auth attempts before which an IP should be banned. Defaults to `10` - **RACK_ATTACK_FINDTIME**: Number of seconds before resetting the per IP auth attempt counter. Defaults to `60`. - **RACK_ATTACK_BANTIME**: Number of seconds an IP should be banned after too many auth attempts. Defaults to `3600`. +- **GITLAB_WORKHORSE_TIMEOUT**: Timeout for gitlab workhorse http proxy. Defaults to `1m0s`. # Maintenance From a5ab6f41db89af37212805905989ffa61cb4d840 Mon Sep 17 00:00:00 2001 From: Mizunashi Mana Date: Mon, 21 Mar 2016 18:59:41 +0900 Subject: [PATCH 3/3] fix default value --- README.md | 2 +- assets/runtime/env-defaults | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ee779a84..fc8bb4b7 100644 --- a/README.md +++ b/README.md @@ -927,7 +927,7 @@ Below is the complete list of available options that can be used to customize yo - **RACK_ATTACK_MAXRETRY**: Number of failed auth attempts before which an IP should be banned. Defaults to `10` - **RACK_ATTACK_FINDTIME**: Number of seconds before resetting the per IP auth attempt counter. Defaults to `60`. - **RACK_ATTACK_BANTIME**: Number of seconds an IP should be banned after too many auth attempts. Defaults to `3600`. -- **GITLAB_WORKHORSE_TIMEOUT**: Timeout for gitlab workhorse http proxy. Defaults to `1m0s`. +- **GITLAB_WORKHORSE_TIMEOUT**: Timeout for gitlab workhorse http proxy. Defaults to `5m0s`. # Maintenance diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index da73f77e..afc593f4 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -90,7 +90,7 @@ if [[ -z ${GITLAB_MAX_OBJECT_SIZE} ]]; then fi fi -GITLAB_WORKHORSE_TIMEOUT=${GITLAB_WORKHORSE_TIMEOUT:-1m0s} +GITLAB_WORKHORSE_TIMEOUT=${GITLAB_WORKHORSE_TIMEOUT:-5m0s} ## ARTIFACTS GITLAB_ARTIFACTS_ENABLED=${GITLAB_ARTIFACTS_ENABLED:-true}