openclaw - 💡(How to fix) Fix liveness warning fires during cold-start blocking (no startup grace window)

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…

Error Message

The diagnostic liveness sampler starts immediately after gateway boot with zero startup-grace window. During normal cold-start operations (model resolution ~18s, auth ~14s, session-resource-loader ~26s, plugin registration ~4s), the Node.js event loop is legitimately blocked for 50-60s total. This triggers false WARN-level liveness warnings:

Fix Action

Fix / Workaround

Workaround (local)

Until an official fix ships, I patched the dist files locally with the #76401 approach:

  • \diagnostic-DbrcADVi.js: Added \diagnosticStartupGraceUntil\ with 100s default
  • \server.impl-DAWM0jI6.js: Same grace for event-loop health snapshot
RAW_BUFFERClick to expand / collapse

Problem

The diagnostic liveness sampler starts immediately after gateway boot with zero startup-grace window. During normal cold-start operations (model resolution ~18s, auth ~14s, session-resource-loader ~26s, plugin registration ~4s), the Node.js event loop is legitimately blocked for 50-60s total. This triggers false WARN-level liveness warnings:

liveness warning: reasons=event_loop_delay interval=35s eventLoopDelayP99Ms=14503.9 eventLoopDelayMaxMs=24912.1 eventLoopUtilization=0.975 cpuCoreRatio=1.047

The channel-health-monitor already has a startupGraceMs guard (default 60s), but the diagnostic heartbeat has no equivalent.

Environment

  • OpenClaw 2026.5.7 (eeef486)
  • Node.js v24.13.0
  • Windows 10 x64
  • 5 model providers, 4 enabled plugins, 12 in allowlist

Existing Work

This is a known issue with multiple related reports and attempted fixes:

  • #75378 - Gateway event loop saturation during parallel subagent spawn (OPEN)
  • #78352 - 16 Telegram bots on Windows cause event loop starvation up to 65s (OPEN)
  • #79838 - event-loop saturation under heavy streaming + multi-channel load (OPEN)
  • #79264 - post-attach.update-sentinel ~9s sync block per model_call (OPEN)

PRs

  • #76401 - suppress liveness warnings during startup-grace window by @hclsys — Added \startupGraceMs: 60_000\ to \startDiagnosticHeartbeat, 23 tests passing. Closed by author after 20h with no maintainer signal. This is the correct fix.
  • #79137 - une diagnostic liveness and idle queue depth — Raises max delay threshold to 10s while keeping P99 at 1s. Still OPEN.
  • #79647 - do not mark event-loop degraded from ELU/CPU without delay evidence — Closed as already-implemented on main.

Proposed Fix

Re-open and merge #76401 (or a fresh PR with the same approach):

  1. Add \startupGraceMs\ option to \StartDiagnosticHeartbeatOptions\
  2. Skip liveness warning emission while
    ow < graceUntil\
  3. Keep the sampler running during grace (for metric resets and baselines), only suppress emission
  4. Default to 60-100s grace window

The key insight from PR #76401: \livenessSample = inStartupGrace ? null : rawLivenessSample\ — sampler still runs every tick, but warnings are gated until the grace window expires.

Additional Request

Consider making the grace window configurable via \OPENCLAW_STARTUP_GRACE_MS\ env var (as a future enhancement), so users with heavier startup loads can tune it.

Workaround (local)

Until an official fix ships, I patched the dist files locally with the #76401 approach:

  • \diagnostic-DbrcADVi.js: Added \diagnosticStartupGraceUntil\ with 100s default
  • \server.impl-DAWM0jI6.js: Same grace for event-loop health snapshot

This suppresses false warnings during cold start without affecting steady-state monitoring.

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 liveness warning fires during cold-start blocking (no startup grace window)