openclaw - 💡(How to fix) Fix 🔴 2026.5.22 Regression: Provider Auth Pre-warm blocks event loop (310s), Gateway becomes unusable

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…

Root Cause

  1. The issue reproduces on both cold start and hot reload — not a transient state
  2. Affects all users with multiple Provider configurations
  3. The auth pre-warm logic appears to be a breaking change between 5.20 and 5.22
  4. Likely related to a change from lightweight token verification to full model list enumeration

Code Example

# First startup after upgrade (SIGUSR1 drain + auto-reload)
2026-05-25T03:58:35.616+08:00 [gateway] provider auth state pre-warmed in 310057ms eventLoopMax=64458.1ms

# After hard restart (kill + fresh start) — issue persists
2026-05-25T04:25:08.080+08:00 [gateway] provider auth state pre-warmed in 179363ms eventLoopMax=43251.7ms

# Memory pressure warning
2026-05-25T03:55:29.702+08:00 [diagnostics/memory] memory pressure: level=warning reason=heap_threshold rssBytes=1390784512 heapUsedBytes=1091051424 thresholdBytes=1073741824
RAW_BUFFERClick to expand / collapse

🔴 2026.5.22 Regression: Provider Auth Pre-warm blocks event loop (310s), Gateway becomes unusable

Reporter: 小龙 (OpenClaw user)
Date: 2026-05-25
Environment: macOS 26.4.1 (MacBook Pro, 16GB RAM, x64), Node.js 24.15.0
Upgrade path: 2026.5.20 → 2026.5.22 → downgraded to 2026.5.20


Problem Description

After upgrading to 2026.5.22, the Gateway's Provider Auth pre-warm mechanism has a severe performance regression. Pre-warm time jumped from milliseconds (normal) to 179-310 seconds, and the entire Node.js event loop is blocked during this process (eventLoopMax reaching 64 seconds), causing all WebSocket requests to queue up.

Reproduction Conditions

  • System: macOS (MacBook Pro)
  • Node.js 24.15.0
  • Multiple Model Providers configured (bailian, xai, openai, ymhss)
  • Upgrade: npm install -g [email protected] + Gateway auto-reload

Impact

MetricNormal (2026.5.20)Broken (2026.5.22)Degradation
Provider auth pre-warm<1s179-310s179-310×
eventLoopMax<1s43-64s43-64×
models.list133-753ms14,000-18,000ms20-135×
sessions.list97-245ms18,000-21,000ms73-216×
chat.history864ms24,000ms28×
sessions.usagenormal131,000mscompletely unusable
Gateway CPU5-15%99%
RSS Memory~0.5GB1.39GB2.8×

Key Logs

# First startup after upgrade (SIGUSR1 drain + auto-reload)
2026-05-25T03:58:35.616+08:00 [gateway] provider auth state pre-warmed in 310057ms eventLoopMax=64458.1ms

# After hard restart (kill + fresh start) — issue persists
2026-05-25T04:25:08.080+08:00 [gateway] provider auth state pre-warmed in 179363ms eventLoopMax=43251.7ms

# Memory pressure warning
2026-05-25T03:55:29.702+08:00 [diagnostics/memory] memory pressure: level=warning reason=heap_threshold rssBytes=1390784512 heapUsedBytes=1091051424 thresholdBytes=1073741824

Analysis

  1. The issue reproduces on both cold start and hot reload — not a transient state
  2. Affects all users with multiple Provider configurations
  3. The auth pre-warm logic appears to be a breaking change between 5.20 and 5.22
  4. Likely related to a change from lightweight token verification to full model list enumeration

Suggested Fixes

Short-term

  1. Publish a known issues notice for 2026.5.22, recommend users hold upgrade
  2. Add openclaw rollback <version> command that auto-handles version markers
  3. Add provider auth pre-warm time check to openclaw doctor

Long-term

  1. Provider auth pre-warm should be async — must not block the event loop
  2. Add pre-warm timeout mechanism (>30s should be treated as abnormal)
  3. Automated downgrade support
  4. Add openclaw upgrade --dry-run pre-check before actual upgrade

Appendix: Environment Details

  • OS: macOS 26.4.1 (MacBook Pro, x64)
  • RAM: 16GB
  • Node.js: 24.15.0
  • Upgraded from: 2026.5.20
  • Upgraded to: 2026.5.22
  • Current: 2026.5.20 (downgraded)
  • Model Providers: bailian (qwen3.6-plus), xai (grok), openai (gpt-5.x), ymhss (claude-opus-4-6-thinking)
  • Plugins: 12 (acpx, bonjour, browser, canvas, codex, device-pair, file-transfer, memory-core, ocnmps-router, phone-control, talk-voice, telegram)

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

openclaw - 💡(How to fix) Fix 🔴 2026.5.22 Regression: Provider Auth Pre-warm blocks event loop (310s), Gateway becomes unusable