openclaw - 💡(How to fix) Fix [Bug]: Session stuck + High memory on v2026.4.26 — works fine on 4.15 [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#74153Fetched 2026-04-30 06:27:55
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
cross-referenced ×2closed ×1commented ×1

Error Message

``` [session-write-lock] releasing lock held for 286780ms (max=15000ms): /Users/jedi/.openclaw/agents/main/sessions/sessions.json.lock [diagnostic] stuck session: sessionId=unknown sessionKey=agent:main:main state=processing age=288s queueDepth=2 [telegram] Polling stall detected (active getUpdates stuck for 227.81s); forcing restart. [plugins] bonjour: restarting advertiser (service stuck in announcing for 58549ms...) [agent/embedded] workspace bootstrap file MEMORY.md is 32804 chars (limit 30000); truncating in injected context ```

RAW_BUFFERClick to expand / collapse

Bug Description

After upgrading from 4.15 to 4.26, gateway becomes unresponsive after a short period. Session locks up in "processing" state, Telegram polling stalls, and memory usage jumps from ~40MB to 1.2GB.

Environment

  • Version: 2026.4.26 (macOS, npm global install)
  • Previous version: 2026.4.15 (works fine)
  • PM2 managed

Symptoms

  1. Memory spike: PM2 shows 1.2GB RSS (vs 42MB on 4.15)
  2. Session stuck: logs show stuck session: sessionKey=agent:main:main state=processing age=288s queueDepth=2
  3. Telegram polling stall: Polling stall detected (active getUpdates stuck for 227s); forcing restart — this repeats every few minutes
  4. Session write lock: [session-write-lock] releasing lock held for 286780ms (max=15000ms) — lock held for 4.7 minutes
  5. Bonjour conflicts: bonjour repeatedly stuck in "announcing" state, creates (2) suffix conflicts

Steps to Reproduce (likely)

Based on issue #71127:

  1. Restart gateway with Telegram channel enabled
  2. Send a Telegram message within the channel-startup window (~5 minutes)
  3. Session becomes stuck in "processing" state

Related Issues

  • #71127 — stuck processing sessions detected but never aborted (v4.25, deterministic repro)
  • #70334 — session lock stuck after context overflow compaction succeeds (v4.21)
  • #70591 — session freezes after compaction, Thinking stuck
  • #41981 — compaction safeguard loop blocks cron lane

Rollback Fix

Downgrading to 4.15 resolves the issue completely:

  • Memory returns to ~42MB
  • No stuck sessions
  • Telegram works normally

Expected Behavior

Session should process messages without getting stuck, and memory should stay stable around 40-100MB on macOS.

Logs

``` [session-write-lock] releasing lock held for 286780ms (max=15000ms): /Users/jedi/.openclaw/agents/main/sessions/sessions.json.lock [diagnostic] stuck session: sessionId=unknown sessionKey=agent:main:main state=processing age=288s queueDepth=2 [telegram] Polling stall detected (active getUpdates stuck for 227.81s); forcing restart. [plugins] bonjour: restarting advertiser (service stuck in announcing for 58549ms...) [agent/embedded] workspace bootstrap file MEMORY.md is 32804 chars (limit 30000); truncating in injected context ```

extent analysis

TL;DR

Downgrade to version 4.15 to resolve the issue, as it has been confirmed to work stably with the expected memory usage and without session locks.

Guidance

  • The issue seems to be related to session management and locking, as indicated by the "stuck session" and "session-write-lock" logs.
  • The memory spike and Telegram polling stall suggest a resource leak or deadlock, which is causing the gateway to become unresponsive.
  • To mitigate the issue, try downgrading to version 4.15, as it has been reported to resolve the problem completely.
  • If downgrading is not feasible, try to identify and disable any recently added plugins or features that might be contributing to the issue.

Example

No code snippet is provided, as the issue seems to be related to a specific version and configuration.

Notes

The issue might be related to changes introduced in version 4.26, and downgrading to 4.15 is the most straightforward solution. However, this might not be a long-term fix, and further investigation is needed to identify the root cause.

Recommendation

Apply workaround: Downgrade to version 4.15, as it has been confirmed to work stably and resolve the issue. This is a temporary solution until the root cause is identified and fixed in a future version.

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