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;"