possibility of defining nginx timeouts
related bug: https://mirantis.jira.com/browse/PROD-14603
Change-Id: I37b99ecec0c9a8ae1c13c02b97ff6e6cbf1d1472
diff --git a/devops_portal/files/nginx.conf b/devops_portal/files/nginx.conf
index 25b6fcc..20b6778 100644
--- a/devops_portal/files/nginx.conf
+++ b/devops_portal/files/nginx.conf
@@ -54,11 +54,19 @@
resolver 127.0.0.11;
set ${{ service.endpoint.address|replace("-", "_") }} {{ service.endpoint.address }};
rewrite ^/api/{{ service_name }}/(.*) /$1 break;
- proxy_pass {{ service_url_dns(service.endpoint) }};
+ proxy_connect_timeout {{ service.proxy_connect_timeout|default(300) }};
+ proxy_send_timeout {{ service.proxy_send_timeout|default(300) }};
+ proxy_read_timeout {{ service.proxy_read_timeout|default(300) }};
+ send_timeout {{ service.send_timeout|default(300) }};
+ proxy_pass {{ service_url_dns(service.endpoint) }};
}
{%- else %}
location /api/{{ service_name }}/ {
- proxy_pass {{ service_url(service.endpoint) }};
+ proxy_connect_timeout {{ service.proxy_connect_timeout|default(300) }};
+ proxy_send_timeout {{ service.proxy_send_timeout|default(300) }};
+ proxy_read_timeout {{ service.proxy_read_timeout|default(300) }};
+ send_timeout {{ service.send_timeout|default(300) }};
+ proxy_pass {{ service_url(service.endpoint) }};
}
{%- endif %}
{%- endif %}