From b2f0c72977898110020f193e61216f0f72eaf813 Mon Sep 17 00:00:00 2001 From: xxm Date: Mon, 24 Aug 2026 16:01:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=87=8D=E8=AF=84timeout=E9=93=BE?= =?UTF-8?q?=E6=94=BE=E5=AE=BD=E2=80=94=E2=80=94per=5Fstock=20call=5Fllm=20?= =?UTF-8?q?90=E2=86=92300(ocg=5Frouter=E5=8D=95key=E4=B8=8A=E6=B8=B8180s+?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=8D=A2key=E9=87=8D=E8=AF=95,90s=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF=E5=85=88=E6=96=AD=3D=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E9=99=90=E6=AD=BB=E8=87=AA=E5=B7=B1),=E5=AD=90=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B180=E2=86=92600,alarm=E2=86=92600?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/per_stock_reassess.py | 2 +- deploy/profile-scripts/price_monitor.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/profile-scripts/per_stock_reassess.py b/deploy/profile-scripts/per_stock_reassess.py index 4e976561..d06c471d 100644 --- a/deploy/profile-scripts/per_stock_reassess.py +++ b/deploy/profile-scripts/per_stock_reassess.py @@ -441,7 +441,7 @@ def main(): if _prompt: try: # 2026-08-13 超时修复:timeout 150→90, retries 1→0(3只×(90+90+20)=600s临界,减到90+0重试=270s安全) - _llm_result = call_llm(_prompt, max_tokens=None, timeout=90, retries=0, backoff=0) # 文档: 不指定max_tokens + _llm_result = call_llm(_prompt, max_tokens=None, timeout=300, retries=0, backoff=0) # 2026-08-24 90→300: ocg_router单key上游180s+失败换key重试,90s客户端先断=自己限死自己 if _llm_result["ok"]: _full_analysis_text = _llm_result["content"] print(f" ✅ LLM12维分析完成({len(_full_analysis_text)}字, {_llm_result['elapsed']:.1f}s)", flush=True) diff --git a/deploy/profile-scripts/price_monitor.py b/deploy/profile-scripts/price_monitor.py index 2d490b9e..529ba145 100644 --- a/deploy/profile-scripts/price_monitor.py +++ b/deploy/profile-scripts/price_monitor.py @@ -128,7 +128,7 @@ try: try: _r = _sp2.run( [sys.executable, _REASSESS_SCRIPT, code], - capture_output=True, text=True, timeout=180 + capture_output=True, text=True, timeout=600 # 2026-08-24 180→600: 子进程含collect_data+LLM(300s上限),并发排队下给足 ) _mark_reassess(code) # 2026-08-24 防鬼消息:子进程失败不得继续读旧策略冒充"重评结论" @@ -635,7 +635,7 @@ def run_once(round_label=""): pass with open(_lk, "w") as _f: _f.write(str(os.getpid())) - signal.alarm(300) # 2026-08-24 120→300:监控面扩到112只+撞锁等待,120s在refresh阶段就被杀,zones循环跑不到(603920盲区第三环) + signal.alarm(600) # 2026-08-24 120→300→600:重评并发后一轮最多6只LLM×~90s,600s覆盖整轮 label = f" [{round_label}]" if round_label else "" start = time.time()