Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
feat(router): custom timeouts for builder and controller
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Sep 6, 2014
1 parent 93a770c commit f9a736b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions docs/managing_deis/router_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ setting description
/deis/controller/host host of the controller component (set by controller)
/deis/controller/port port of the controller component (set by controller)
/deis/router/bodySize nginx body size setting (default: 1m)
/deis/router/builder/timeout/connect proxy_connect_timeout for deis-builder (default: 10000). Unit in miliseconds
/deis/router/builder/timeout/read proxy_read_timeout for deis-builder (default: 1200000). Unit in miliseconds
/deis/router/builder/timeout/send proxy_send_timeout for deis-builder (default: 1200000). Unit in miliseconds
/deis/router/builder/timeout/tcp timeout for deis-builder (default: 1200000). Unit in miliseconds
/deis/router/controller/timeout/connect proxy_connect_timeout for deis-controller (default: 10m)
/deis/router/controller/timeout/read proxy_read_timeout for deis-controller (default: 20m)
/deis/router/controller/timeout/send proxy_send_timeout for deis-controller (default: 20m)
/deis/router/gzip nginx gzip setting (default: on)
/deis/router/gzipHttpVersion nginx gzipHttpVersion setting (default: 1.0)
/deis/router/gzipCompLevel nginx gzipCompLevel setting (default: 2)
Expand Down
14 changes: 7 additions & 7 deletions router/templates/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ http {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_connect_timeout 10s;
proxy_send_timeout 1200s;
proxy_read_timeout 1200s;
proxy_connect_timeout {{ or (.deis_router_controller_timeout_connect) "10s" }};
proxy_send_timeout {{ or (.deis_router_controller_timeout_send) "20m" }};
proxy_read_timeout {{ or (.deis_router_controller_timeout_read) "20m" }};

proxy_pass http://deis-controller;
}
Expand Down Expand Up @@ -117,12 +117,12 @@ http {
tcp {
access_log /dev/stdout;
tcp_nodelay on;
timeout 1200000;
timeout {{ or (.deis_router_builder_timeout_tcp) "1200000" }};

# same directive names, but these are in miliseconds...
proxy_connect_timeout 10000;
proxy_send_timeout 1200000;
proxy_read_timeout 1200000;
proxy_connect_timeout {{ or (.deis_router_builder_timeout_connect) "10000" }};
proxy_send_timeout {{ or (.deis_router_builder_timeout_send) "1200000" }};
proxy_read_timeout {{ or (.deis_router_builder_timeout_read) "1200000" }};

upstream builder {
server {{ .deis_builder_host }}:{{ .deis_builder_port }};
Expand Down

0 comments on commit f9a736b

Please sign in to comment.