openclaw - 💡(How to fix) Fix Webhook plugin re-registers repeatedly whenever event loop saturates (dreaming, cron catchup, Control UI polling) [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#75298Fetched 2026-05-01 05:35:36
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
2
Timeline (top)
commented ×1

The webhooks plugin re-registers its route repeatedly (5–10x per gateway session) whenever the Node.js event loop saturates. This is not limited to cold start — it reproduces via at least three distinct triggers observed in the same gateway session.

Root Cause

The webhooks plugin re-registers its route repeatedly (5–10x per gateway session) whenever the Node.js event loop saturates. This is not limited to cold start — it reproduces via at least three distinct triggers observed in the same gateway session.

RAW_BUFFERClick to expand / collapse

Version: 2026.4.27 (also reproduced on 2026.4.26) Setup: Docker container, Windows 11 host, Compose stack, single webhook route (ai-news)

Summary

The webhooks plugin re-registers its route repeatedly (5–10x per gateway session) whenever the Node.js event loop saturates. This is not limited to cold start — it reproduces via at least three distinct triggers observed in the same gateway session.

Reproduction scenarios

All three occurred in a single overnight gateway session (same uptime, no restart):

Scenario 1 — Startup with missed cron jobs: ``` 20:45:05 — [webhooks] registered route ai-news (normal startup) 20:46:45 — [webhooks] registered route ai-news ← re-registration #2 20:47:20 — [webhooks] registered route ai-news ← re-registration #3 20:47:32 — [webhooks] registered route ai-news ← re-registration #4 20:47:44 — [webhooks] registered route ai-news ← re-registration #5 20:47:57 — [webhooks] registered route ai-news ← re-registration #6 20:47:58 — [diagnostic] eventLoopDelayMaxMs=51506ms eventLoopUtilization=1.0 ← CPU fully saturated 20:47:58 — [whatsapp] Web connection closed (status 408) ```

Scenario 2 — Control UI polling storm: ``` 21:32:52–21:33:11 — rapid sessions.list + node.list calls from Control UI (10 calls in 19s) 21:33:11 — [webhooks] registered route ai-news ← re-registration 21:33:12 — [diagnostic] eventLoopDelayMaxMs=12884ms eventLoopUtilization=0.875 21:33:12 — [ws] node.list resolved in 14131ms ```

Scenario 3 — memory-core dreaming run: ``` 02:00:16 — [diagnostic] liveness warning (event loop delay) 02:00:19 — [webhooks] registered route ai-news ← re-registration 02:00:38 — [webhooks] registered route ai-news ← re-registration 02:00:39 — [whatsapp] Web connection closed (status 408) 02:00:39 — [ws] node.list resolved in 18810ms 02:00:45 — [plugins] memory-core: normalized recall artifacts before dreaming 02:01:02 — [webhooks] registered route ai-news ← re-registration ```

Idle baseline

Even during quiet periods between these events, the event loop shows persistent background delay: ``` eventLoopDelayMaxMs consistently 5000–6000ms across multiple 30s diagnostic intervals eventLoopUtilization ~0.3–0.5 at idle ```

Pattern

Re-registrations always coincide with or immediately follow a [diagnostic] liveness warning with elevated eventLoopDelayMaxMs or eventLoopUtilization. No config reload, channel restart, plugin bootstrap, or session reset lines are visible between consecutive re-registrations.

Hypothesis

The webhook plugin's register() is being called each time the plugin runtime reloads or re-initialises a session surface under event loop pressure. The root trigger is event loop saturation, not any specific feature — cron catchup, dreaming, and Control UI polling all reproduce it independently.

Impact

  • WhatsApp 408 drops correlating with saturation events
  • Channel node.list and sessions.list WS calls taking 14–18s during cascade
  • Unclear whether duplicate route registrations cause handler duplication or are safely idempotent

Question

Is webhooks plugin register() expected to be called more than once per gateway lifecycle? If not, what session/plugin lifecycle event is triggering re-registration under event loop load? Is there a guard that should be preventing this?

Version: 2026.4.27 | Docker | Windows 11 host | Compose stack

extent analysis

TL;DR

The webhook plugin's repeated re-registrations under event loop saturation can be mitigated by ensuring the register() function is idempotent or by implementing a guard to prevent multiple registrations.

Guidance

  • Investigate the register() function in the webhook plugin to determine if it is designed to be idempotent, meaning it can be safely called multiple times without adverse effects.
  • If the register() function is not idempotent, consider implementing a guard or a singleton pattern to prevent multiple registrations.
  • Review the plugin's session lifecycle events to identify what triggers the re-registration under event loop load.
  • Consider optimizing the event loop to reduce saturation, which may involve improving the performance of CPU-intensive tasks or adjusting the diagnostic intervals.

Example

No specific code example is provided due to the lack of explicit code details in the issue.

Notes

The provided information suggests that the issue is related to the event loop saturation and the webhook plugin's registration mechanism. However, without more specific details about the plugin's implementation, it is difficult to provide a definitive solution.

Recommendation

Apply a workaround by making the register() function idempotent or by implementing a guard to prevent multiple registrations, as this is likely to mitigate the issue without requiring significant changes to the underlying system.

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 Webhook plugin re-registers repeatedly whenever event loop saturates (dreaming, cron catchup, Control UI polling) [1 comments, 2 participants]