HTTP control plane wedges /health on 40k+ observation stores
Description
On hosts with a large local store (~40k–64k observations and a ~305MB Jina embedding cache), memorix serve-http accepts TCP on :3211 but /health and MCP initialize time out for tens of seconds. LaunchAgents / watchdogs that probe /health or initialize in 15s then kill a process that is still warming up, which looks like a crash loop.
This is the HTTP control-plane form of #27 (closed). 1.6.0 still hydrates the corpus and parses the on-disk embedding cache on the HTTP event loop during createMemorixServer / first runtime init. stdio already had deferProjectRuntimeInit: true; serve-http did not (until the work in #214).
Steps to Reproduce
- Use a live store with ~40k+ SQLite observations and a ~300MB
.embedding-api-cache.json/.jsonl. memorix background startfrom a git project (not$HOME).- Immediately
curl -m 5 http://127.0.0.1:3211/healthand POST MCPinitializewith a 15s timeout. - Optionally run a LaunchAgent that kills the listener when initialize exceeds 15s.
Expected Behavior
/health answers in milliseconds as soon as the HTTP server is listening. MCP initialize / tools/list complete without waiting for corpus hydrate or cache parse. Vector attach happens after the handshake.
Actual Behavior
/health times out. initialize returns 0 bytes for 15–20s. Watchdogs SIGTERM a healthy warmup. OpenCode / Grok / Cursor HTTP clients mark the server failed.
Environment
- Memorix 1.6.0 (
npm/ bun global) - macOS 26.6 (darwin 25.6.0) and Linux (dev host)
- ~44k–64k observations, Jina Omni 1024d, ~305MB embedding cache
- HTTP control plane on
127.0.0.1:3211
Additional Context
Fix direction is in #214 (deferProjectRuntimeInit on serve-http). Owner asked that PR to rebase onto current main (1.6.1) and drop the stacked #212 rerank commit.
Related: #27, #70, #214.
Field-report index from a 2026-08-17 three-host E2E (MacBook 16, MacBook 13, Linux). Each item is its own issue:
- #215 HTTP
/healthwedge on 40k+ stores - #216 Embedding cache worker destroyed a 319MB on-disk cache
- #217 Hook writes
loadAll()the full corpus - #218 CLI
memory searchstays alive after printing - #219
background startcan spawndist/index.js(stdio) - #220
background startcan launch$HOME/node_modules/memorix - #221 Cache-only provider create still parses JSONL
- #222 Concurrent cache loads parse JSONL twice
- #223 Vector attach starves MCP initialize / OpenCode
- #224 First
memorix_session_startstill 15–28s - #225
$HOMEbind + decoy~/memorix.db(follow-up to #198)
Fix direction for 215–223 is in #214 (needs rebase onto current main / 1.6.1; must not carry #212). #224 and #225 remain after that PR.
Fix is in PR https://github.com/AVIDS2/memorix/pull/214 — not on main yet, so leaving this issue open until that PR merges.
Relevant work:
35358a1a4c— defer HTTP runtime hydration until the first real tool so/healthstays responsive on 40k+ stores- Files:
src/cli/commands/serve-http.ts,src/sdk.ts,src/memory/observations.ts - Follow-up:
01763fa1ee(initialize stays responsive while cached vectors attach),382e367d9d(ordinary store off the embedding-cache hot path)
Out of scope for #214 (tracked separately): #224 first memorix_session_start 15–28s, #225 $HOME / decoy db.
Fixed by #214 and released in v1.6.2. The control plane now starts serving /health before large-store hydration work, and the 40,000-record acceptance gate passes on Windows. Closing as shipped.