openclaw - 💡(How to fix) Fix [Bug]: Gateway event-loop stalls during [1 comments, 2 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#75214Fetched 2026-05-01 05:36:46
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
3
Author
Timeline (top)
labeled ×2commented ×1

On a fresh OpenClaw 2026.4.27 install, the Gateway repeatedly emits diagnostic liveness warnings showing multi-second Node event-loop stalls.

The stalls correlate with Gateway RPC paths including:

  • chat.history
  • logs.tail
  • memory_search / memory-core indexing

Root Cause

On a fresh OpenClaw 2026.4.27 install, the Gateway repeatedly emits diagnostic liveness warnings showing multi-second Node event-loop stalls.

The stalls correlate with Gateway RPC paths including:

  • chat.history
  • logs.tail
  • memory_search / memory-core indexing

Fix Action

Fix / Workaround

sqlite-vec before mitigation:

Intermittent but recurring. Multiple warnings were observed across the same day, including after Gateway restart and after sqlite-vec mitigation. Consequence:

Code Example

2026-04-30T06:43:28.116-06:00 ⇄ res ✓ chat.history 17181ms
2026-04-30T06:43:28.124-06:00 liveness warning: reasons=event_loop_delay interval=38s eventLoopDelayMaxMs=13220.4
2026-04-30T10:12:05.301-06:00 ⇄ res ✓ logs.tail 44413ms
2026-04-30T10:12:05.303-06:00 ⇄ res ✓ logs.tail 44416ms
2026-04-30T10:12:05.305-06:00 ⇄ res ✓ logs.tail 44418ms


2026-04-30T10:19:05.317-06:00 liveness warning: reasons=event_loop_delay eventLoopDelayMaxMs=5297.4
2026-04-30T10:22:05.317-06:00 liveness warning: reasons=event_loop_delay eventLoopDelayMaxMs=4978.6


sqlite-vec before mitigation:

sqlite-vec unavailable: Cannot find package 'sqlite-vec' imported from .../plugin-runtime-deps/.../dist/engine-storage-CO3qFXo7.js
Did you mean to import "sqlite-vec/index.cjs"?
After manual install:

dynamic import sqlite-vec OK
loadable .../node_modules/sqlite-vec-linux-x64/vec0.so


GC evidence:

Largest observed GC pauses: ~68.5ms, 58.2ms, 32.7ms
Observed event-loop stalls: ~5s, ~13s, ~20s, ~47s
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

On a fresh OpenClaw 2026.4.27 install, the Gateway repeatedly emits diagnostic liveness warnings showing multi-second Node event-loop stalls.

The stalls correlate with Gateway RPC paths including:

  • chat.history
  • logs.tail
  • memory_search / memory-core indexing

Steps to reproduce

NOT_ENOUGH_INFO

Expected behavior

Start OpenClaw Gateway on 2026.4.27. Open the Control UI / WebChat so it issues Gateway WebSocket RPCs. Open or refresh views that trigger chat.history and/or the Logs tab that triggers logs.tail. Observe Gateway logs for RPC duration and diagnostic liveness warnings.

Evidence observed:

2026-04-30T06:43:28.116-06:00 ⇄ res ✓ chat.history 17181ms 2026-04-30T06:43:28.124-06:00 liveness warning ... eventLoopDelayMaxMs=13220.4

2026-04-30T10:12:05.301-06:00 ⇄ res ✓ logs.tail 44413ms 2026-04-30T10:12:05.303-06:00 ⇄ res ✓ logs.tail 44416ms

Actual behavior

Gateway UI RPCs such as chat.history and logs.tail should return within a short bounded time and should not block the Gateway Node.js event loop long enough to trigger diagnostic liveness warnings. OpenClaw docs describe logs.tail as a bounded Gateway file-log tail RPC and diagnostic liveness warnings as indicators that the Gateway event loop or CPU is saturated.

Actual behavior

Observed Gateway RPCs took multiple seconds to tens of seconds, followed by or near diagnostic liveness warnings showing multi-second event-loop stalls.

Observed examples:

chat.history 17181ms liveness warning ... eventLoopDelayMaxMs=13220.4

logs.tail 44413ms logs.tail 44416ms logs.tail 44418ms

Additional observed liveness warnings after restart:

2026-04-30T10:19:05.317-06:00 liveness warning ... eventLoopDelayMaxMs=5297.4 2026-04-30T10:22:05.317-06:00 liveness warning ... eventLoopDelayMaxMs=4978.6

OpenClaw version

2026.4.27 (cbc2ba0)

Operating system

Ubuntu 24.04.4

Install method

curl -fsSL https://openclaw.ai/install.sh | bash

Model

openai-codex/gpt-5.5

Provider / routing chain

openclaw -> openai/cordex

Additional provider/model setup details

OpenClaw version: 2026.4.27 (cbc2ba0) OS: Ubuntu 24.04.4 LTS (Noble Numbat) Node: v24.14.1 Model: openai-codex/gpt-5.5 Runtime: OpenClaw Pi Default Auth: OAuth profile, redacted Session: main Discord channel session Execution: direct, elevated enabled Related local setup detail:

sqlite-vec was missing from: ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.27-c6d8e67505cb/node_modules

Manual install of [email protected] made dynamic import work from plugin-runtime-deps.

Logs, screenshots, and evidence

2026-04-30T06:43:28.116-06:00 ⇄ res ✓ chat.history 17181ms
2026-04-30T06:43:28.124-06:00 liveness warning: reasons=event_loop_delay interval=38s eventLoopDelayMaxMs=13220.4
2026-04-30T10:12:05.301-06:00 ⇄ res ✓ logs.tail 44413ms
2026-04-30T10:12:05.303-06:00 ⇄ res ✓ logs.tail 44416ms
2026-04-30T10:12:05.305-06:00 ⇄ res ✓ logs.tail 44418ms


2026-04-30T10:19:05.317-06:00 liveness warning: reasons=event_loop_delay eventLoopDelayMaxMs=5297.4
2026-04-30T10:22:05.317-06:00 liveness warning: reasons=event_loop_delay eventLoopDelayMaxMs=4978.6


sqlite-vec before mitigation:

sqlite-vec unavailable: Cannot find package 'sqlite-vec' imported from .../plugin-runtime-deps/.../dist/engine-storage-CO3qFXo7.js
Did you mean to import "sqlite-vec/index.cjs"?
After manual install:

dynamic import sqlite-vec OK
loadable .../node_modules/sqlite-vec-linux-x64/vec0.so


GC evidence:

Largest observed GC pauses: ~68.5ms, 58.2ms, 32.7ms
Observed event-loop stalls: ~5s, ~13s, ~20s, ~47s

Impact and severity

Affected users/systems/channels: Affected: this OpenClaw Gateway instance, Control UI/WebChat RPCs, Discord-backed main agent session. Affected RPC paths observed: chat.history, logs.tail, memory_search / memory indexing.

Severity:

Blocks or degrades workflow. Gateway does not necessarily crash, but multi-second to tens-of-seconds event-loop stalls delay UI/log/history access and can cause liveness warnings and handshake timeouts.

Frequency:

Intermittent but recurring. Multiple warnings were observed across the same day, including after Gateway restart and after sqlite-vec mitigation. Consequence:

Delayed chat history loading, delayed log tailing, degraded debugging experience, possible UI reconnect/handshake issues, and reduced trust in Gateway responsiveness. No direct data-loss or data-risk evidence observed.

Additional information

No response

extent analysis

TL;DR

Investigate and optimize the performance of Gateway RPC paths, particularly chat.history and logs.tail, to reduce event-loop stalls and liveness warnings.

Guidance

  • Review the Gateway logs to identify patterns and correlations between RPC requests and event-loop stalls.
  • Consider increasing the resources (e.g., CPU, memory) allocated to the Gateway instance to handle the workload.
  • Investigate the sqlite-vec manual installation and its potential impact on performance, ensuring it is properly configured and optimized.
  • Monitor GC pauses and event-loop stalls to understand their contribution to the overall performance issues.

Example

No specific code snippet is provided, as the issue is more related to performance optimization and configuration.

Notes

The issue seems to be related to performance and resource utilization, rather than a specific code bug. The sqlite-vec manual installation may be a contributing factor, but its impact is unclear. Further investigation and monitoring are necessary to identify the root cause and optimize the Gateway performance.

Recommendation

Apply workaround: Optimize Gateway performance by increasing resources, reviewing RPC path implementations, and monitoring GC pauses and event-loop stalls. This approach is recommended as it addresses the symptoms and allows for further investigation to identify the root cause.

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…

FAQ

Expected behavior

Start OpenClaw Gateway on 2026.4.27. Open the Control UI / WebChat so it issues Gateway WebSocket RPCs. Open or refresh views that trigger chat.history and/or the Logs tab that triggers logs.tail. Observe Gateway logs for RPC duration and diagnostic liveness warnings.

Evidence observed:

2026-04-30T06:43:28.116-06:00 ⇄ res ✓ chat.history 17181ms 2026-04-30T06:43:28.124-06:00 liveness warning ... eventLoopDelayMaxMs=13220.4

2026-04-30T10:12:05.301-06:00 ⇄ res ✓ logs.tail 44413ms 2026-04-30T10:12:05.303-06:00 ⇄ res ✓ logs.tail 44416ms

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 [Bug]: Gateway event-loop stalls during [1 comments, 2 participants]