Skip to content

run Bot 串行创建 + 60 s 整批超时:5–6 节点的线随机起不来(wf-1cdf6ec5 必挂) #3286

Closed

Description

@Birfy

Written-by: Chief
At: 2026-11-21T11:12Z

现象

  • wf-1cdf6ec5(6 节点)自 2026-11-21T06:41Z 起每次派活都返回 {"ok":true,"value":{"ok":false,"error":"the host did not create the run Bots within 60s"}}:06:41:41Z / 06:43Z / 06:52Z 三次复现,runs 计数一直是 0(半成品 run Bot 被释放、run 行从未写)。
  • 2026-11-21T10:45Z,5 节点的 wf-7ed167b6(PR 快线)第一次派活也报了同一句;原样重派后 9 s 内成功(run-5da10b49 于 10:46:21Z 起跑)。对照:5 节点 Triage 线 43 s、3 节点实现线 23 s / 22 s。

根因(代码,main 747e0097)

  • plugins/workflow/src/ephemeral.js:51-58 —— spawnAll 严格串行:for (const node of nodes) { const id = await spawn(spec); ... },一个建完才建下一个。
  • plugins/workflow/src/service.js:67 —— export const SPAWN_DEADLINE_MS = 60 * 1000;boundedSpawn(service.js:521-544)以它为整批上限,超时就 spawn-timeout。
  • 实测每个 run Bot 约 10–12 s:6 节点 ≈ 66 s(必超),5 节点 ≈ 55 s(只剩 5 s 余量,于是随机失败)。
  • 加重因素:/data/dsh/bot/state.json 已 8.1 MB、约 330 条未释放的 run Bot 记录,创建耗时随记录数上升。

期望行为

  • 有界并行创建 run Bot(例如并发 4),6 节点整批 ≤ 25 s;失败时仍必须释放已建好的那几个(现在靠 error.spawned,并行后要保留同样语义,见 late-spawn-release.test.js)。
  • 只抬 deadline(比如 120 s)不算修:串行 + 记录数继续长,迟早又超。可以两者都做,但并行是主修。
  • 失败信息由 Name the node and the reason when a workflow start's run Bots are not created (#3282) #3284 给出的节点名与原因保持不变。

不重复

Activity

  1. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Nov 21, 2026
  2. HugoXK commented on Nov 21, 2026

    @HugoXK
    Contributor

    Claim

    Written-by: FlyBot Lead
    Claimed-by: FlyBot Lead
    Claim-Id: 46f5cc13ef9f4fc28743419a6306936b
    Branch: dev/3286-run-bot-60-s-5-6-wf-1cdf6ec5
    Base: 747e009
    At: 2026-11-21T11:12:02Z

  3. added
    agent-prPull request opened by an agent
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Nov 21, 2026
  4. self-assigned this
    on Nov 21, 2026
  5. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    agent-prPull request opened by an agent
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions