File tree Expand file tree Collapse file tree
server/opensandbox_server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -292,6 +292,7 @@ def main() -> None:
292292 port = server_main .app_config .server .port ,
293293 reload = args .reload ,
294294 log_config = server_main ._log_config ,
295+ timeout_keep_alive = server_main .app_config .server .timeout_keep_alive ,
295296 )
296297
297298
Original file line number Diff line number Diff line change @@ -240,6 +240,14 @@ class ServerConfig(BaseModel):
240240 le = 65535 ,
241241 description = "Port exposed by the lifecycle API server." ,
242242 )
243+ timeout_keep_alive : int = Field (
244+ default = 30 ,
245+ ge = 1 ,
246+ description = (
247+ "Idle keep-alive timeout in seconds passed to uvicorn. "
248+ "Connections idle longer than this may be closed by the server."
249+ ),
250+ )
243251 log_level : str = Field (
244252 default = "INFO" ,
245253 description = "Python logging level for the server process." ,
Original file line number Diff line number Diff line change @@ -227,4 +227,5 @@ async def health_check():
227227 port = app_config .server .port ,
228228 reload = True ,
229229 log_config = _log_config ,
230+ timeout_keep_alive = app_config .server .timeout_keep_alive ,
230231 )
You can’t perform that action at this time.
0 commit comments