Discord thread starter 缓存加 TTL+LRU,防止长期内存膨胀(PR #5274)
解决长时间运行后 Discord 线程起始消息缓存无限增长问题:加入 5 分钟 TTL 与 500 项上限 LRU 淘汰。
GITHUBDiscovered 2026-02-13Author webvijayi
Prerequisites
- Discord integration is active in a busy server with frequent thread activity.
- You can observe gateway memory trend over at least 30-60 minutes.
Steps
- Record baseline memory and cache-related behavior during thread-heavy traffic.
- Upgrade to build containing PR #5274 and restart gateway.
- Generate thread traffic continuously (create/reply/archive cycles) for a fixed test window.
- Confirm stale cache entries expire around TTL and working set stabilizes near LRU cap.
- Keep one regression check for thread-reply correctness after cache churn.
Commands
openclaw gateway statusopenclaw gateway restartopenclaw statusVerify
Memory growth flattens in long-running Discord thread workloads and thread context resolution remains functional.
Caveats
- Extremely bursty workloads can still cause short-lived peaks even with TTL/LRU controls.
- Exact memory impact depends on Node runtime and other active plugins(需验证)。
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗