Skip to content

0.9.30 exits at every start on a moderately large store: hardcoded 15 s worker readiness wait #1530

Closed

Description

@SylvainRamousse

Summary

On 0.9.30 the server exits at every start on a store of moderate size, because the CLI waits a hardcoded 15 s for the worker to become ready. On our store the worker needs about 48 s. Everything works once it is up. 0.9.29 starts fine on the same data.

Environment

  • Docker, built from deploy/coolify (node:22-slim, iiidev/iii:0.22.1, iii-sdk 0.22.1, @agentmemory/agentmemory@0.9.30)
  • file_based KV state, about 9.8k sessions, 9.6k observations, 220 memories (≈350 MB /data)
  • Upgrading from 0.9.29 / iii 0.11.2

What happens

First start: the migrations run (migrated the vector index to bucketed storage, legacy audit log left frozen), then:

agentmemory worker did not become ready within 15s.

The process exits with code 1. Every later start (migrations already done) ends the same way. The worker is still loading state when the 15 s run out.

With the waits raised in dist/cli.mjs (waitForAgentmemoryReady(15e3) → 300e3, waitForEngine(15e3) → 120e3), the same container comes up 48 s after iii-engine process started. From then on everything we tested works: all memories are kept, MCP shim 0.9.29 and 0.9.30 both proxy correctly (54 tools), and memory_export, memory_recall, memory_save and memory_governance_delete all succeed.

On main, src/cli.ts still hardcodes waitForAgentmemoryReady(15000) (and waitForEngine(5000/15000)).

Request

Make the readiness waits configurable, for example AGENTMEMORY_READY_TIMEOUT_MS / AGENTMEMORY_ENGINE_READY_TIMEOUT_MS, or scale them with the store size. A store that loads slowly but correctly should not prevent the server from starting.

(The block-style allowed_origins problem we also hit with deploy/coolify is already tracked in #1508.)

Activity

  1. yufeng-liang commented on Oct 13, 2026

    @yufeng-liang

    Noting for anyone landing here from a fresh install: the fix in #1531 is merged into main (commit 1c2f0ad, 2026-10-12), but it is not in any published artifact yet.

    • npm view @agentmemory/agentmemory dist-tags → latest: 0.9.30
    • 0.9.30 was published 2026-10-06, six days before the fix merged
    • package.json on main still reads "version": "0.9.30"

    So npm i -g @agentmemory/agentmemory today still installs the pre-fix build with the hardcoded 15e3 wait, and anyone hitting this has to patch dist/cli.mjs by hand. My local dist/cli.mjs.bak (pre-patch) has AGENTMEMORY_READY_TIMEOUT_MS 0 times and 15e3 8 times, which is consistent with the pre-fix source.

    A patch release (0.9.31) would let people drop the manual patch. The PR itself says "Native Windows has not been validated" — for what it is worth, the env-var fix does work on native Windows 11 (NT 10.0.26340) under a watchdog task, where startup regularly needs well over 15 s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions