This repository was archived by the owner on Aug 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +15
-2
lines changed Expand file tree Collapse file tree 4 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 2
2
CHANGELOG
3
3
=========
4
4
5
+ 1.1.3
6
+ =====
7
+
8
+ * bug-fix: make sure nginx proxy_read_timeout >= gunicorn worker timeout
9
+
5
10
1.1.2
6
11
=====
7
12
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def read(fname):
14
14
15
15
setup (
16
16
name = 'sagemaker_container_support' ,
17
- version = '1.1.2 ' ,
17
+ version = '1.1.3 ' ,
18
18
description = 'Open source library for creating containers to run on Amazon SageMaker.' ,
19
19
20
20
packages = [PKG_NAME ],
Original file line number Diff line number Diff line change 29
29
proxy_set_header Host $http_host;
30
30
proxy_redirect off;
31
31
proxy_pass http://gunicorn;
32
+ proxy_read_timeout %NGINX_PROXY_READ_TIMEOUT%;
32
33
}
33
34
34
35
location / {
Original file line number Diff line number Diff line change @@ -162,9 +162,16 @@ def _create_nginx_config(serving_env):
162
162
template = cs .utils .read_file (nginx_config_template_file )
163
163
pattern = re .compile (r'%(\w+)%' )
164
164
165
+ # make sure nginx proxy timeout >= gunicorn timeout
166
+ proxy_read_timeout = 60
167
+ if int (serving_env .model_server_timeout ) > 60 :
168
+ proxy_read_timeout = int (serving_env .model_server_timeout )
169
+
165
170
template_values = {
166
- 'NGINX_HTTP_PORT' : serving_env .http_port
171
+ 'NGINX_HTTP_PORT' : serving_env .http_port ,
172
+ 'NGINX_PROXY_READ_TIMEOUT' : str (proxy_read_timeout )
167
173
}
174
+
168
175
config = pattern .sub (lambda x : template_values [x .group (1 )], template )
169
176
logger .info ('nginx config: \n %s\n ' , config )
170
177
cs .utils .write_file (nginx_config_file , config )
You can’t perform that action at this time.
0 commit comments