[deps] Please bump iii-sdk / iii-engine past 0.11.2 — unbounded RSS growth + hung graceful shutdown in long-running deployments

Author: mokundongworkCreated Sep 1, 2026Updated Sep 14, 2026

Summary

agentmemory 0.9.29 pins iii-sdk: 0.11.2 (exact pin, no caret). Upstream iii has since released v0.22.1 stable (2026-08-07) and is on 0.23.0-rc.10, i.e. 11 minor versions ahead. We are asking for a dependency bump (or validation that newer iii works), because 0.11.2 shows two production-stability problems on our bare-metal deployment.

Environment

  • agentmemory 0.9.29 (npm global, bare-metal systemd), iii-engine v0.11.2
  • Linux x86_64, Node 22, file_based KV store (~240 MB on disk, ~84k observations)
  • Single worker, moderate write load (hooks from a few coding agents)

Problem 1: unbounded iii-engine RSS growth

The iii engine process grows resident memory far beyond the on-disk dataset and never plateaus:

Date iii RSS On-disk KV
Day 0 (fresh start) ~1.2 GB ~210 MB
Day 1 5.7 GB ~230 MB
Day 3 9.7 GB ~240 MB

RSS-to-data ratio of ~40x after 3 days. A restart resets it to ~1.2 GB, so this is accumulation, not working-set. We currently mitigate with MemoryHigh=6G / MemoryMax=8G cgroup limits plus a daily scheduled restart (which itself mostly exits via SIGKILL — see Problem 2).

Suspect areas: file_based state adapter caching, stream store buffers, or observability/OTel batching inside the engine.

Problem 2: graceful shutdown hangs regardless of RSS

SIGINT to the agentmemory worker does not complete within 90 s, even with a freshly started 0.9 GB engine and no large in-flight state flush. systemd TimeoutStopSec=90 then SIGKILLs. Note this happened at ~1 GB RSS as well as at ~9.7 GB, so it does not appear to be purely memory-size-dependent — more likely pending in-flight operations (LLM-backed triggers / KV flush) that are not aborted on shutdown.

Additionally, the SIGKILL → restart path can race: rapid stop/start cycles hit systemd's default start rate limit (start-limit-hit), leaving the service down until a human intervenes. We had to set StartLimitIntervalSec=0 to make daily restarts safe.

Why a bump may help

  • 0.11.2 → 0.22.x contains substantial engine work (queue/transport rebuilds at boot, observability fixes, telemetry heartbeat rate-limiting, etc.).
  • We could not find an existing upstream report matching our leak signature (RSS >> on-disk size for file_based KV), so the fix may already be somewhere in the 11 minors, or this report helps both projects.

Ask

  1. Bump iii-sdk (and the pinned engine version) to a recent iii release, or publish guidance on which iii versions are protocol-compatible.
  2. If 0.22.x can't be adopted soon, any recommended mitigation for RSS growth other than restarts would be welcome.

Happy to provide more instrumentation (engine logs over time, memory_allocator stats if exposed) if useful.