Skip to content

[Bug] Event loop freeze (9+ min) + Discord heartbeat timeout + local embeddings regression #75577

Description

@Crabsticksalad

Bug Description

Since upgrading from v2026.4.26 (which was stable for weeks) to v2026.4.29, the gateway experiences extreme event loop blocking that causes cascading channel failures.

Environment

  • WSL2 on Windows, Linux 6.6, node 22.22.2, 11GB RAM
  • Gateway v2026.4.29 running as systemd service
  • 116 bundled plugins loaded
  • Local node-llama-cpp embeddings with GGUF model for memory search
  • Two Discord accounts, two Telegram accounts

Symptoms

1. Event loop freeze
Diagnostic endpoint /readyz shows:

{
  "eventLoop": {
    "degraded": true,
    "reasons": ["event_loop_delay", "event_loop_utilization", "cpu"],
    "delayMaxMs": 566398,
    "utilization": 0.973
  }
}

eventLoopDelayMaxMs of 566,398ms (9.4 minutes) — event loop completely frozen.

2. Discord failures

  • Gateway heartbeat ACK timeout — both bots drop and reconnect in loops
  • Bots appear online in Discord but do not respond to any messages
  • Discord API calls timing out: /users/@me at 21+ seconds
  • Error: Gateway heartbeat ACK timeout

3. Telegram failures

  • getUpdates polling stalls for 590+ seconds
  • Multiple restart cycles with [diag] polling cycle finished reason=polling stall detected

4. Per-turn plugin re-evaluation
Embedded run traces show every message triggers full plugin reload:

first run:  core-plugin-tools: 11965ms, system-prompt: 143488ms, total: 170551ms
second run: core-plugin-tools: 22732ms (grows!), system-prompt: 51513ms, total: 92050ms

system-prompt taking 143 seconds on first run — context assembly blocked by plugin re-evaluation.

Regression Timeline

  • v2026.4.26: stable — no issues with CPU, memory, or gateway
  • v2026.4.27: runtime-deps packaging bugs (node-llama-cpp missing, sqlite-vec missing) — fixed with manual copy workaround
  • v2026.4.29: fresh upgrade — regression to event loop blocking

Comparison to Existing Issues

What might be unique to our setup

The combination of:

  1. WSL2 without GPU (node-llama-cpp falls back to no-GPU mode, CPU-saturated)
  2. Local memory embeddings always active
  3. 116 bundled plugins

May amplify the per-turn plugin re-evaluation issue beyond what other reporters are seeing.

Workaround

Downgrading to v2026.4.26 confirmed as working. OPENCLAW_DIRTY_DISCOVERY_CACHE=1 workaround not yet tested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions