1010from .embed_cache .manager import start_cache_manager
1111from lightllm .utils .log_utils import init_logger
1212from lightllm .utils .envs_utils import set_env_start_args , set_unique_server_name , get_unique_server_name
13- from lightllm .utils .envs_utils import get_lightllm_gunicorn_time_out_seconds , get_lightllm_gunicorn_keep_alive
13+ from lightllm .utils .envs_utils import get_lightllm_gunicorn_keep_alive
1414from .detokenization .manager import start_detokenization_process
1515from .router .manager import start_router_process
1616from lightllm .utils .process_check import is_process_active
@@ -333,13 +333,11 @@ def normal_or_p_d_start(args):
333333 ],
334334 )
335335
336- # 启动 gunicorn
336+ # 启动 Hypercorn
337337 command = [
338- "gunicorn " ,
338+ "hypercorn " ,
339339 "--workers" ,
340340 f"{ args .httpserver_workers } " ,
341- "--worker-class" ,
342- "uvicorn.workers.UvicornWorker" ,
343341 "--bind" ,
344342 f"{ args .host } :{ args .port } " ,
345343 "--log-level" ,
@@ -349,8 +347,6 @@ def normal_or_p_d_start(args):
349347 "--error-logfile" ,
350348 "-" ,
351349 "lightllm.server.api_http:app" ,
352- "--timeout" ,
353- f"{ get_lightllm_gunicorn_time_out_seconds ()} " ,
354350 "--keep-alive" ,
355351 f"{ get_lightllm_gunicorn_keep_alive ()} " ,
356352 ]
@@ -403,11 +399,9 @@ def pd_master_start(args):
403399 )
404400
405401 command = [
406- "gunicorn " ,
402+ "hypercorn " ,
407403 "--workers" ,
408404 "1" ,
409- "--worker-class" ,
410- "uvicorn.workers.UvicornWorker" ,
411405 "--bind" ,
412406 f"{ args .host } :{ args .port } " ,
413407 "--log-level" ,
@@ -418,8 +412,6 @@ def pd_master_start(args):
418412 "-" ,
419413 "--preload" ,
420414 "lightllm.server.api_http:app" ,
421- "--timeout" ,
422- f"{ get_lightllm_gunicorn_time_out_seconds ()} " ,
423415 "--keep-alive" ,
424416 f"{ get_lightllm_gunicorn_keep_alive ()} " ,
425417 ]
@@ -445,11 +437,9 @@ def config_server_start(args):
445437 set_env_start_args (args )
446438
447439 command = [
448- "gunicorn " ,
440+ "hypercorn " ,
449441 "--workers" ,
450442 "1" ,
451- "--worker-class" ,
452- "uvicorn.workers.UvicornWorker" ,
453443 "--bind" ,
454444 f"{ args .config_server_host } :{ args .config_server_port } " ,
455445 "--log-level" ,
@@ -460,8 +450,6 @@ def config_server_start(args):
460450 "-" ,
461451 "--preload" ,
462452 "lightllm.server.config_server.api_http:app" ,
463- "--timeout" ,
464- f"{ get_lightllm_gunicorn_time_out_seconds ()} " ,
465453 "--keep-alive" ,
466454 f"{ get_lightllm_gunicorn_keep_alive ()} " ,
467455 ]
0 commit comments