From 2f3ceefd305c8998ae3772726190aca14bbe6521 Mon Sep 17 00:00:00 2001 From: Taka Date: Wed, 25 Mar 2020 04:38:08 +0000 Subject: [PATCH] Shortened the nginx proxy timeouts. --- web/docker/nginx-default.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/docker/nginx-default.conf b/web/docker/nginx-default.conf index 2594859..41d3b74 100644 --- a/web/docker/nginx-default.conf +++ b/web/docker/nginx-default.conf @@ -12,7 +12,13 @@ server { location /api { proxy_pass http://flask:5000 ; rewrite ^/api/(.*) /$1 break ; + # NOTE: The frontend and backend containers will be running on the same host. If we can't connect + # within a few seconds, something's wrong and there's nothing to be gained by having longer timeouts. + proxy_connect_timeout 10 ; + proxy_read_timeout 10 ; + proxy_send_timeout 10 ; } + location /user { proxy_pass http://flask:5000 ; rewrite ^/user/(.*) /user-files/$1 break ;