From 876ca5080b47bfb9ea484f916561f2c68e3d37a0 Mon Sep 17 00:00:00 2001 From: lvliang-intel Date: Wed, 17 Jul 2024 09:40:19 +0800 Subject: [PATCH] Enlarge megaservice request timeout for supporting high concurrency (#279) Signed-off-by: lvliang-intel --- comps/cores/mega/orchestrator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/comps/cores/mega/orchestrator.py b/comps/cores/mega/orchestrator.py index aa153625a..956dbbbe9 100644 --- a/comps/cores/mega/orchestrator.py +++ b/comps/cores/mega/orchestrator.py @@ -40,7 +40,8 @@ def flow_to(self, from_service, to_service): async def schedule(self, initial_inputs: Dict, llm_parameters: LLMParams = LLMParams()): result_dict = {} - async with aiohttp.ClientSession(trust_env=True) as session: + timeout = aiohttp.ClientTimeout(total=1000) + async with aiohttp.ClientSession(trust_env=True, timeout=timeout) as session: pending = {asyncio.create_task(self.execute(session, node, initial_inputs)) for node in self.ind_nodes()} while pending: