@@ -64,9 +64,12 @@ def __init__(self):
64
64
self ._tfs_inter_op_parallelism = os .environ .get ("SAGEMAKER_TFS_INTER_OP_PARALLELISM" , 0 )
65
65
self ._tfs_intra_op_parallelism = os .environ .get ("SAGEMAKER_TFS_INTRA_OP_PARALLELISM" , 0 )
66
66
self ._gunicorn_worker_class = os .environ .get ("SAGEMAKER_GUNICORN_WORKER_CLASS" , "gevent" )
67
- self ._gunicorn_setup_timeout_seconds = int (os .environ .get (
68
- "SAGEMAKER_GUNICORN_SETUP_TIMEOUT_SECONDS" , 30
69
- ))
67
+ self ._gunicorn_timeout_seconds = int (
68
+ os .environ .get ("SAGEMAKER_GUNICORN_TIMEOUT_SECONDS" , 30 )
69
+ )
70
+ self ._gunicorn_setup_timeout_seconds = int (
71
+ os .environ .get ("SAGEMAKER_GUNICORN_SETUP_TIMEOUT_SECONDS" , 30 )
72
+ )
70
73
71
74
if os .environ .get ("OMP_NUM_THREADS" ) is None :
72
75
os .environ ["OMP_NUM_THREADS" ] = "1"
@@ -205,7 +208,7 @@ def _setup_gunicorn(self):
205
208
206
209
gunicorn_command = (
207
210
"gunicorn -b unix:/tmp/gunicorn.sock -k {} --chdir /sagemaker "
208
- "--workers {} --threads {} --log-level {} "
211
+ "--workers {} --threads {} --log-level {} --timeout {} "
209
212
"{}{} -e TFS_GRPC_PORTS={} -e TFS_REST_PORTS={} "
210
213
"-e SAGEMAKER_MULTI_MODEL={} -e SAGEMAKER_SAFE_PORT_RANGE={} "
211
214
"-e SAGEMAKER_TFS_WAIT_TIME_SECONDS={} "
@@ -215,6 +218,8 @@ def _setup_gunicorn(self):
215
218
self ._gunicorn_workers ,
216
219
self ._gunicorn_threads ,
217
220
self ._gunicorn_loglevel ,
221
+ self ._gunicorn_timeout_seconds ,
222
+ self ._gunicorn_setup_timeout_seconds ,
218
223
python_path_option ,
219
224
"," .join (python_path_content ),
220
225
self ._tfs_grpc_concat_ports ,
0 commit comments