openclaw - ✅(Solved) Fix [Bug] Feishu multi-account startup: bot info probe timeout due to concurrent API requests [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63475Fetched 2026-04-09 07:53:20
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1referenced ×1

When configuring multiple Feishu accounts (e.g. main, gent-b, gent-c), the gateway fires bot identity probes (GET /open-apis/bot/v3/info) and enant_access_token requests for all accounts concurrently during startup. One account consistently times out (10s or 30s), though it rotates across different accounts on each restart.

Error Message

[error]: AxiosError: timeout of 10000ms exceeded

Root Cause

When configuring multiple Feishu accounts (e.g. main, gent-b, gent-c), the gateway fires bot identity probes (GET /open-apis/bot/v3/info) and enant_access_token requests for all accounts concurrently during startup. One account consistently times out (10s or 30s), though it rotates across different accounts on each restart.

Fix Action

Fixed

PR fix notes

PR #63481: fix(feishu): serialise startup bot-info probes across concurrent accounts

Description (problem / solution / changelog)

Problem

Fixes #63475

With multiple Feishu accounts configured, the gateway starts all accounts concurrently via Promise.all() in server-channels.ts. Each account's startAccount calls monitorSingleAccount without a prefetched bot identity, causing fetchBotIdentityForMonitor to fire concurrently for all accounts. This floods Feishu's /open-apis/bot/v3/info endpoint from the same IP, causing one account to rotate through timeouts on each restart.

Root Cause

Two code paths exist for multi-account startup:

  1. Multi-account path (monitor.ts:55–93): probes sequentially via a for loop ✅
  2. Per-account path (monitor.ts:39–53): called by the gateway's startAccount callback, which runs all accounts in Promise.all() — no serialisation ❌

The gateway always uses path 2, so the sequential probing in path 1 is never reached during normal startup.

Fix

Add a module-level promise-chain queue to fetchBotIdentityForMonitor in monitor.startup.ts:

  • Only one bot-info probe is in-flight at any time, regardless of how many concurrent callers exist
  • A failing probe does not block subsequent accounts (rejections are swallowed in the queue chain)
  • Defensive try/catch added around the probeFeishu call for robustness
  • Queue is reset between tests via resetStartupProbeQueueForTest()

Changes

FileChange
extensions/feishu/src/monitor.startup.tsAdd serialisation queue around fetchBotIdentityForMonitor; extract core logic to fetchBotIdentityCore; add resetStartupProbeQueueForTest export
extensions/feishu/src/monitor.startup.test.tsAdd 3 regression tests covering concurrent serialisation, failure isolation, and abort-signal propagation

Tests

All 7 tests in monitor.startup.test.ts pass (4 existing + 3 new):

  • serialises concurrent fetchBotIdentityForMonitor calls from parallel startAccount
  • does not block subsequent accounts when one probe fails
  • respects abort signal inside the serialised queue

All related test suites (probe.test.ts, channel.test.ts, monitor.*.test.ts) continue to pass.

Changed files

  • extensions/feishu/src/monitor.startup.test.ts (modified, +172/-0)
  • extensions/feishu/src/monitor.startup.ts (modified, +50/-6)
RAW_BUFFERClick to expand / collapse

Environment

  • OpenClaw version: 2026.4.5 (3e72c03)
  • Node.js: v24.13.1
  • OS: Windows 10 (x64)
  • Feishu connection mode: WebSocket

Description

When configuring multiple Feishu accounts (e.g. main, gent-b, gent-c), the gateway fires bot identity probes (GET /open-apis/bot/v3/info) and enant_access_token requests for all accounts concurrently during startup. One account consistently times out (10s or 30s), though it rotates across different accounts on each restart.

Observed Pattern (from logs)

Startup timeTimed-out botImmediately resolved
00:16agent-b (30s timeout → unknown)agent-c ✅, main ✅
00:30main (30s timeout → unknown)agent-b ✅, agent-c ✅
08:50main (30s timeout → unknown)agent-b ✅, agent-c ✅

The timed-out bot enters background retry with exponential backoff (60s, 120s, 300s, 600s, 900s) and recovers after ~60s.

Relevant Log Entries

\
[gateway] starting channels and sidecars... [feishu] starting feishu[agent-b] (mode: websocket) [feishu] starting feishu[agent-c] (mode: websocket) [feishu] starting feishu[main] (mode: websocket) [feishu] feishu[main]: bot info probe timed out after 30000ms; continuing startup [feishu] feishu[agent-b]: bot open_id resolved: ou_f986e... [feishu] feishu[agent-c]: bot open_id resolved: ou_ac44c... [feishu] feishu[main]: bot open_id resolved: unknown [feishu] feishu[main]: bot open_id unknown; starting background retry (delays: 60s, 120s, 300s, 600s, 900s)

[error]: AxiosError: timeout of 10000ms exceeded url: 'https://open.feishu.cn/open-apis/bot/v3/info' code: 'ECONNABORTED' \\

Suspected Cause

Feishu Open API rate-limits concurrent \ enant_access_token\ and /bot/v3/info\ requests from the same IP. When 3 accounts fire simultaneously, the 3rd request is throttled and times out.

Suggested Fix

Serialize or stagger the bot info probes across accounts during startup (e.g. 1–2s delay between each account's initialization), rather than firing all concurrently.

extent analysis

TL;DR

Serialize or stagger the bot info probes across accounts during startup to avoid concurrent requests that may trigger Feishu Open API rate limits.

Guidance

  • Implement a delay between the initialization of each Feishu account to prevent concurrent requests, for example, using setTimeout to introduce a 1-2 second delay between each account's startup.
  • Verify the effectiveness of this change by monitoring the logs for timeout errors and observing the behavior of the bot info probes.
  • Consider implementing exponential backoff with jitter to reduce the likelihood of concurrent requests and minimize the impact of rate limiting.
  • Review Feishu Open API documentation to understand the specific rate limits and adjust the delay accordingly.

Example

const accounts = ['main', 'agent-b', 'agent-c'];
const delay = 1000; // 1 second delay

accounts.forEach((account, index) => {
  setTimeout(() => {
    // Initialize Feishu account and send bot info probe
    startFeishuAccount(account);
  }, index * delay);
});

Notes

The suggested fix assumes that the Feishu Open API rate limits are the primary cause of the timeouts. However, other factors may contribute to the issue, and additional debugging may be necessary to fully resolve the problem.

Recommendation

Apply the workaround by serializing or staggering the bot info probes across accounts during startup, as this approach is likely to mitigate the rate limiting issue and reduce the occurrence of timeouts.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING