Repository navigation
Conversation
b2de7c1 to
aa06606
Compare
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: an open, mergeable, proof-positive sibling PR owns the same linked gateway bug with the same bounded-concurrency approach plus regression coverage, while this branch remains a weaker competing landing candidate without real behavior proof. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this duplicate branch, continue review on #101589, keep #101552 open until that PR merges, and leave #86718 for the broader Gateway usage/cost availability work. So I’m closing this here and keeping the remaining discussion on #101589, #101552, and #86718. Review detailsBest possible solution: Close this duplicate branch, continue review on #101589, keep #101552 open until that PR merges, and leave #86718 for the broader Gateway usage/cost availability work. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main and Is this the best way to solve the issue? No as this branch's landing path. The implementation is plausible, but #101589 is the better canonical solution because it covers the same root cause with regression coverage and sufficient terminal proof. Security review: Security review cleared: No security or supply-chain concern found; the diff only changes gateway usage aggregation code and adds no dependencies, workflows, permissions, downloads, package metadata, or secret handling. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against e591dcfa8213. |
aa06606 to
26c028d
Compare
26c028d to
da4da0a
Compare
da4da0a to
3f78915
Compare
…tion Promise.all over all agent usage queries exhausted the SQLite connection pool for deployments with 100+ agents, causing SQLITE_BUSY timeouts or memory spikes when loading the usage dashboard. Replace Promise.all with runTasksWithConcurrency(limit=8) to cap simultaneous queries against the shared state database. Fixes openclaw#101552
Preserve the fail-fast semantics of the original Promise.all by setting errorMode: "stop" and explicitly throwing firstError, matching the existing runTasksWithConcurrency usage in the same file at line 1290. Co-Authored-By: Claude <[email protected]>
2e551b2 to
9f6bc45
Compare
|
Thanks @tzy-17. This is now superseded by the canonical repair in #101589, landed as e5c2247. The underlying all-agent fan-out problem was valid. The landed version uses the existing sibling policy of 12 concurrent usage-cache loads instead of introducing a second arbitrary limit of 8, shares one generic constant across both handlers, preserves the original all-or-nothing error behavior, and includes deterministic regression coverage. Direct source inspection also showed filesystem-backed usage-cache and transcript work rather than SQLite connection-pool starvation. Closing this weaker duplicate now that the complete fix is on |
What Problem This Solves
Fixes #101552:
Promise.allover all agent usage queries created an unbounded array of concurrent database operations. For deployments with 100+ agents, this instantly saturated the SQLite WAL lock and connection pool, causingSQLITE_BUSYtimeouts or memory spikes when the usage dashboard loaded.Why This Change Was Made
Replaced
Promise.allwithrunTasksWithConcurrency({ limit: 8 })to cap simultaneous usage queries against the shared state database. This prevents SQLite starvation while keeping dashboard load times reasonable.User Impact
Evidence
pnpm test src/gateway/server-methods/usage.test.ts— 60 tests passoxlintpassesrunTasksWithConcurrencyis already imported and used elsewhere in the codebase🤖 Generated with Claude Code