MemPalace/mempalace · error · SystemExit
2
2
Error message
Writable MCP HTTP startup refused: %s
What it means
Error "Writable MCP HTTP startup refused: %s" thrown in MemPalace/mempalace.
Source
Thrown at mempalace/mcp_server.py:7992
break
def _run_http_loop() -> None:
# In HTTP mode there is no JSON-RPC stdio channel. Keeping the import-time
# stdout->stderr guard in place means any accidental print from a dependency
# still cannot masquerade as an HTTP response.
logger.info("MemPalace MCP HTTP server starting...")
# A writable HTTP server is a long-lived storage client, so it must own the
# local palace before it binds. Refusing at startup avoids advertising a
# writable service that will only fail (or race) on its first mutation.
# Explicit read-only HTTP remains safe to run beside the one writer owner.
owns_writer_lease = False
if not _READ_ONLY:
writer_ok, writer_reason = _acquire_mcp_writer_lock()
if not writer_ok:
logger.error("Writable MCP HTTP startup refused: %s", writer_reason)
raise SystemExit(2)
owns_writer_lease = True
try:
# The HTTP transport exists for long-lived deployments. Do the cheap
# filesystem-only probe before binding, but never make the listener wait on
# optional embedder/HNSW warmup. Operators and tests should see /healthz as
# soon as the process is alive.
_refresh_vector_disabled_flag()
_start_idle_exit_watchdog()
_start_write_stall_watchdog()
raw_warmup = os.environ.get("MEMPALACE_EAGER_WARMUP", "").strip().lower()
if raw_warmup in _WARMUP_TRUTHY:
def _warmup_with_lock():
with _HTTP_REQUEST_LOCK:
_maybe_eager_warmup_embedder()
View on GitHub (pinned to 06cb6987f0)
Solutions
- Stop the existing writable owner, or route writes through it
When it happens
Trigger: Thrown at mempalace/mcp_server.py:7992 when the library encounters an invalid state.
Common situations: Another writable MCP/direct/daemon owner already holds the local backend.
AI-assisted analysis of MemPalace/mempalace@06cb6987f0 (2026-08-15).
Data as JSON: /api/errors/a45abb360ea3ff77.
Report an issue: GitHub.