From 16d21ed1a3b433a28642a4f3d2a39469c4ade2fc Mon Sep 17 00:00:00 2001 From: Sumesh Pradhan Date: Thu, 6 Jul 2023 18:01:26 +0530 Subject: [PATCH] feat: Configurable api server timeout on embedded nginx (#24471) ## Description - The default request timeout on nginx is set to 60s. This feat allows users to configure custom nginx timeout value specified via the Environment variable `APPSMITH_SERVER_TIMEOUT` - Solves https://github.com/appsmithorg/appsmith/issues/14535 ## Testing #### How Has This Been Tested? - [x] Manual - [ ] Jest - [ ] Cypress --------- Co-authored-by: Shrikant Sharat Kandula --- deploy/docker/templates/nginx/nginx-app-http.conf.template.sh | 2 ++ deploy/docker/templates/nginx/nginx-app-https.conf.template.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/deploy/docker/templates/nginx/nginx-app-http.conf.template.sh b/deploy/docker/templates/nginx/nginx-app-http.conf.template.sh index 7f918bc7e1..07c8a8f295 100644 --- a/deploy/docker/templates/nginx/nginx-app-http.conf.template.sh +++ b/deploy/docker/templates/nginx/nginx-app-http.conf.template.sh @@ -85,6 +85,8 @@ server { } location /api { + proxy_read_timeout ${APPSMITH_SERVER_TIMEOUT:-60}; + proxy_send_timeout ${APPSMITH_SERVER_TIMEOUT:-60}; proxy_pass http://localhost:8080; } diff --git a/deploy/docker/templates/nginx/nginx-app-https.conf.template.sh b/deploy/docker/templates/nginx/nginx-app-https.conf.template.sh index 49486235a3..e61b2df1d3 100644 --- a/deploy/docker/templates/nginx/nginx-app-https.conf.template.sh +++ b/deploy/docker/templates/nginx/nginx-app-https.conf.template.sh @@ -102,6 +102,8 @@ server { } location /api { + proxy_read_timeout ${APPSMITH_SERVER_TIMEOUT:-60}; + proxy_send_timeout ${APPSMITH_SERVER_TIMEOUT:-60}; proxy_pass http://localhost:8080; }