From 9431dbe98e298200dc3d168d12bfa3af5bc097e9 Mon Sep 17 00:00:00 2001 From: gyurix Date: Fri, 24 Jun 2022 06:44:13 +0000 Subject: [PATCH] Haproxy template and nginx default timeout settings were modified. --- scripts/haproxy_template.cfg | 7 ++++--- scripts/nginx_config_create.sh | 12 ++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/haproxy_template.cfg b/scripts/haproxy_template.cfg index b21101b..fcd9fd9 100644 --- a/scripts/haproxy_template.cfg +++ b/scripts/haproxy_template.cfg @@ -1,11 +1,12 @@ global log stdout format raw local0 debug defaults - timeout client 300s - timeout server 300s - timeout connect 60s mode http option redispatch option http-server-close log global + proxy_connect_timeout 300; + proxy_send_timeout 300; + proxy_read_timeout 300; + proxy_next_upstream off; diff --git a/scripts/nginx_config_create.sh b/scripts/nginx_config_create.sh index 9ba454d..43c182d 100755 --- a/scripts/nginx_config_create.sh +++ b/scripts/nginx_config_create.sh @@ -176,7 +176,11 @@ location = /$ERROR_PAGE { proxy_set_header X-Forwarded-Proto "'$scheme'"; proxy_set_header Upgrade "'$http_upgrade;'" proxy_cookie_path / /; - proxy_set_header Connection "'$http_connection'";" + proxy_set_header Connection "'$http_connection'"; + proxy_connect_timeout 300; + proxy_send_timeout 300; + proxy_read_timeout 300; + proxy_next_upstream off;" if [[ "$DEBUG" != "true" ]]; then echo " access_log off;" @@ -229,7 +233,11 @@ location = /$ERROR_PAGE { proxy_set_header X-Forwarded-Proto "'$scheme'"; proxy_set_header Upgrade "'$http_upgrade;'" proxy_cookie_path $ALP_LOCAL_PATH $ALP_LOCAL_PATH; - proxy_set_header Connection "'$http_connection'";" + proxy_set_header Connection "'$http_connection'"; + proxy_connect_timeout 300; + proxy_send_timeout 300; + proxy_read_timeout 300; + proxy_next_upstream off;" if [[ "$DEBUG" != "true" ]]; then echo " access_log off;"