diff --git a/src/promptflow/promptflow/_sdk/_service/entry.py b/src/promptflow/promptflow/_sdk/_service/entry.py index d92a22b7470..d728a86898f 100644 --- a/src/promptflow/promptflow/_sdk/_service/entry.py +++ b/src/promptflow/promptflow/_sdk/_service/entry.py @@ -173,7 +173,12 @@ def validate_port(port, force_start): win32api.CloseHandle(thread_handle) else: # Set host to localhost, only allow request from localhost. - cmd = ["waitress-serve", f"--listen=127.0.0.1:{port}", "promptflow._sdk._service.entry:get_app"] + cmd = [ + "waitress-serve", + f"--listen=127.0.0.1:{port}", + "promptflow._sdk._service.entry:get_app", + f"--threads={PF_SERVICE_WORKER_NUM}", + ] subprocess.Popen(cmd, stdout=subprocess.DEVNULL, start_new_session=True) is_healthy = check_pfs_service_status(port) if is_healthy: