openclaw - 💡(How to fix) Fix [Bug]: Managed memory dreaming cron can overload gateway under pressure [1 pull requests]

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…

Managed memory dreaming cron can sweep many workspaces in one gateway tick, keeping the gateway under memory and CPU pressure instead of yielding background work.

Root Cause

Managed memory dreaming cron can sweep many workspaces in one gateway tick, keeping the gateway under memory and CPU pressure instead of yielding background work.

Fix Action

Fixed

Code Example

memory-core: dreaming promotion complete (workspaces=10, candidates=10, applied=1, failed=0)
observed managed background task duration: 69621ms
memory pressure warning: rssBytes=1827979264 heapUsedBytes=684072312 thresholdBytes=1610612736
liveness warning: eventLoopUtilization=0.991 cpuCoreRatio=1.107 active=0 waiting=0 queued=0
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Managed memory dreaming cron can sweep many workspaces in one gateway tick, keeping the gateway under memory and CPU pressure instead of yielding background work.

Steps to reproduce

  1. Run OpenClaw with memory-core short-term dreaming enabled for a multi-workspace agent setup.
  2. Let the managed memory dreaming cron fire while the gateway is already under load.
  3. Observe the gateway continuing the dreaming sweep across all configured workspaces during the same tick.

Expected behavior

Managed background memory dreaming should avoid adding substantial gateway pressure: cron-triggered work should be bounded per tick and deferred when RSS or heap pressure is already high.

Actual behavior

Observed logs show one managed dreaming cron tick processing 10 workspaces and taking 69621 ms while nearby diagnostics reported high memory pressure and a saturated event loop.

OpenClaw version

NOT_ENOUGH_INFO

Operating system

NOT_ENOUGH_INFO

Install method

NOT_ENOUGH_INFO

Model

NOT_ENOUGH_INFO

Provider / routing chain

NOT_ENOUGH_INFO

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

memory-core: dreaming promotion complete (workspaces=10, candidates=10, applied=1, failed=0)
observed managed background task duration: 69621ms
memory pressure warning: rssBytes=1827979264 heapUsedBytes=684072312 thresholdBytes=1610612736
liveness warning: eventLoopUtilization=0.991 cpuCoreRatio=1.107 active=0 waiting=0 queued=0

Impact and severity

Affected: gateways with memory-core short-term dreaming enabled across multiple workspaces. Severity: high for responsiveness when background memory work overlaps active gateway load. Frequency: observed during managed dreaming cron execution. Consequence: background memory promotion can consume gateway time and memory during normal operation, contributing to delayed or saturated agent handling.

Additional information

The attached fix bounds managed cron dreaming to a small rotating workspace batch, defers cron-triggered dreaming when process RSS or heap pressure is above warning thresholds, and applies the same cron guard to queued managed heartbeat delivery.

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

Managed background memory dreaming should avoid adding substantial gateway pressure: cron-triggered work should be bounded per tick and deferred when RSS or heap pressure is already high.

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]: Managed memory dreaming cron can overload gateway under pressure [1 pull requests]