Troubleshooting¶
Each entry gives a symptom, its cause and the fix. Start with the two commands below: most
problems are identified by the fields of /healthz and the first lines of the spongram log.
curl -sS http://localhost:8091/healthz
docker compose logs --tail 200 spongram # Swarm: docker service logs spongram_spongram
docker compose logs --tail 200 graphiti-mcp # Swarm: docker service logs spongram_graphiti-mcp
Observability explains every field and log line.
Memories¶
add_memory answers "queued" but nothing appears in the graph¶
add_memory acknowledges a memory as soon as it is in the durable queue. Extraction by Graphiti
happens afterwards and needs the model. If the counters of the brain stay at zero long after the
call, the extraction is failing. Check in this order.
| Cause | How to recognise it | Fix |
|---|---|---|
SPONGRAM_INTERNAL_AUTH_TOKEN is missing, or differs between the two services |
spongram logs SPONGRAM_INTERNAL_AUTH_TOKEN is not set at start; Graphiti's calls to /_internal/v1/graphiti/* get 503 (not set) or 401 (different value) |
Set the same value on spongram and as OPENAI_API_KEY of graphiti-mcp, then restart both |
| Graphiti is not routed through the Spongram proxy | graphiti-mcp logs an HTTP 401 on a request to api.openai.com |
Set both OPENAI_API_URL and OPENAI_BASE_URL of graphiti-mcp to http://spongram:8091/_internal/v1/graphiti. With only the first, a client that falls back to the OpenAI SDK default reaches api.openai.com with the internal token as key |
| Graphiti refuses to start | graphiti-mcp exits with Graphiti inference must route through Spongram's internal proxy |
The configured URL does not end with /_internal/v1/graphiti. Correct the two variables above |
| The provider is unreachable, the key is wrong, or the model cannot produce strict structured output | spongram logs upstream errors or breaker OPEN; spongram_inference_retry_exhausted_total grows |
Run the connection test on the Settings page (Inference providers) and fix what fails |
| No provider is configured (customer installation of the Cloud control plane) | The proxy answers 503 Configure the customer inference gateway in the Cloud console |
Configure the provider in the console |
| Nothing is wrong, extraction is still running | components.pending_episodes_worker.queue_depth in /healthz is 0 and the graph fills in a little later |
Wait. queue_depth: 0 means "forwarded to Graphiti", not "searchable" |
The memories are not lost while you fix the cause. They stay in the queue and are retried after 30 seconds, 2 minutes, 10 minutes, 30 minutes, 1 hour, then every 6 hours. A memory that Graphiti acknowledged but never wrote is found by the reconciler and submitted again.
Episodes are stored but have no entity and no fact¶
Cause. The model answered the entity-extraction call with an empty list for a text that does name entities. It happens with reasoning-capable models served with reasoning off.
Check. In the Neo4j Browser:
MATCH (e:Episodic) WHERE NOT (e)-[:MENTIONS]->()
RETURN e.group_id AS brain, count(e) AS episodes_without_entity;
A few such episodes are normal: some texts name nothing. A growing number is the problem.
Fix. With a spt-models or vllm provider, set SPONGRAM_THINKING_GRAPHITI_ENTITIES=low
on the spongram service and restart it. Confirm with the start log line
thinking levels: graphiti=off (ExtractedEntities=low), …. To extract an affected episode
again, call add_memory with the uuid of the existing episode and its original text: the
episode keeps its identifier and date. Do this only for an episode that has no MENTIONS
relation at all, otherwise its relations are duplicated.
A new memory does not show up in search¶
Cause. Two delays add up. Extraction is asynchronous, and with the hot cache on
(SPONGRAM_HOT_CACHE_ENABLED), a search response is served from the cache for
SPONGRAM_HOT_CACHE_TTL_SEC (300 seconds by default). Writing a memory does not invalidate the
cache, because the graph has not changed yet when the write is acknowledged. Deletions
(delete_episode, delete_entity_edge, clear_graph) do invalidate it at once.
Fix. Wait for one TTL after extraction. If that bound is too long for your use, lower the
TTL or turn the cache off. Also check the scope of the search: with read scoping on, a search
scoped to one project does not return memories filed under another
(Tagging and scope).
A delete answers "nothing was deleted, retry in a moment"¶
The full message is A memory of this brain is being written; nothing was deleted, retry in a
moment.
Cause. Graphiti allows one writer per brain. A delete waits for the memory currently being
extracted in the same brain, up to SPONGRAM_DELETE_LOCK_WAIT_SECONDS (45 seconds), then gives
up without deleting anything. It is frequent during an import, or when extraction is slow
(reasoning enabled, a loaded provider).
Fix. Retry once ingestion is idle. Raising the wait is possible on the graphiti-mcp
service, but changing its environment restarts it.
A purged brain fills up again¶
Cause. The admin purge route removes the graph and leaves the ingestion queue as it is. The reconciler then sees accepted memories missing from the graph and submits those of the last 30 days again.
Fix. Have the owner of the brain call the MCP tool clear_graph, which also retires its
queue rows, or delete the instance and create a new one. The options are detailed in
Backup and restore. With the Cloud control plane a purge retires the
queued work itself.
Connectivity and clients¶
Graphiti answers 421 Misdirected Request¶
Cause. The MCP application of older Graphiti MCP releases accepts only the header
Host: localhost:<port>; the service name, or localhost without the port, is rejected with
421 — Invalid Host header. Recent releases apply the check only when the server binds to
localhost. Spongram always sends Host: localhost:<port>, with the port taken from
SPONGRAM_GRAPHITI_URL, so it is not affected.
Fix. You meet this only when calling Graphiti by hand. Do not: nothing but spongram should
talk to it. For a diagnostic, GET /health accepts any Host.
A 307 redirect on /mcp/¶
Cause. The MCP endpoint is /mcp, without a trailing slash, on Spongram and on Graphiti.
Graphiti answers a POST /mcp/ with a 307 whose Location is built from the request's Host
header, which points the caller at an address it cannot reach. Spongram's own client posts to
/mcp and never meets the redirect.
Fix. Configure MCP URLs without the trailing slash: https://spongram.example.com/mcp.
400 Unsupported protocol version¶
{"jsonrpc": "2.0", "id": "server-error",
"error": {"code": -32600, "message": "Bad Request: Unsupported protocol version: … Supported versions: 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25"}}
Cause. The client used the session-less form of the MCP protocol: an MCP-Protocol-Version
header or announced version outside the list, or the method server/discover. The server refuses
it on purpose. Spongram delivers its instructions, the active persona and the
tagging rules in the answer to initialize; a client that skipped initialize would get none
of them.
Fix. Clients fall back to initialize by themselves. If yours does not, pin it to one of
the listed versions. See Client contract.
MCP clients are disconnected at each deployment¶
Cause. The service was replaced stop-first: the old container stopped before the new one
was ready. Clients got a transport error, marked the server disconnected, and stay so until the
user reconnects.
Fix. On Swarm, keep update_config.order: start-first and the /readyz healthcheck of the
shipped stack file (Docker Swarm with Portainer). On Compose, an update
always stops the container first: announce a short interruption and ask users to reconnect
(in Claude Code, /mcp then reconnect). No reconfiguration is needed; keys are unaffected.
Requests answered 429¶
Cause. The per-brain rate limit, SPONGRAM_RATE_LIMIT_PER_MIN (100 by default).
Fix. Raise the value, or set it to 0 to disable the limit. spongram_rate_limited_total
shows which brain is affected.
Streams cut or responses arriving in one block behind the reverse proxy¶
Cause. The proxy buffers responses or applies a short read timeout.
Fix. Disable buffering and raise the read timeout on /mcp and /v1/graph/stream.
Health and deployment¶
The container restarts in a loop although it serves requests¶
Cause. Its healthcheck calls /healthz. That endpoint answers 503 when a background worker
is unhealthy or disabled, and the orchestrator kills the container for it.
Fix. Point the healthcheck at /readyz.
/healthz answers 503 but everything works¶
Cause. Read the body. "status": "degraded" with the three dependencies ok means a worker
is stalled or not_configured. On a server, a worker disabled with
SPONGRAM_SLEEPER_ENABLED=0 or SPONGRAM_DREAM_ENABLED=0 reports not_configured, and
/healthz then answers 503 permanently.
Fix. For a stalled worker, look for its errors in the log and check the inference provider.
For a disabled worker, monitor /readyz and the individual fields instead of the HTTP status.
==> migrations refused: An applied migration changed¶
Cause. A migration file recorded in the journal no longer has the content it had when it was applied. The image was built from modified sources.
Fix. Build from the sources that match the database, and never edit a released migration file, not even a comment. Nothing was changed by the refused start. See Upgrades and migrations.
==> migrations refused: Existing unjournalled schema¶
Cause. First start of a release with the migration journal on a database created before it.
Fix. Set SPONGRAM_ADOPT_SCHEMA to 0033 or legacy as described in
Upgrades and migrations. Do not create the journal by hand.
A redeploy undid a manual change¶
Cause. A stack webhook or stack update re-applies the stored stack definition. It discards
variables added with docker service update --env-add and returns a service to the image named
in that definition, including a Graphiti image you had updated by hand.
Fix. Record the change in the stored stack variables or definition (Docker Swarm with Portainer).
Swarm rejects the task with "no matching manifest"¶
Cause. The image was built for one CPU architecture and the scheduler placed the task on a node of another.
Fix. Publish a multi-architecture image, or constrain the service to matching nodes.
The service refuses to start with the Cloud control plane¶
| Message | Cause | Fix |
|---|---|---|
Managed Cloud spaces require SPONGRAM_CLOUD_CONTROL_ENABLED |
Brains are managed by the control plane and the variable is off | Turn it back on. A deployment cannot return to unmanaged access |
Customer runtime must use a separate NOSUPERUSER NOBYPASSRLS role without table ownership |
The API connects as the schema owner or as a privileged role | Give SPONGRAM_DATABASE_URL the runtime role and run migrations with the owner role |
Managed Cloud installations require PostgreSQL |
The database URL is not PostgreSQL | Use PostgreSQL |
Inference¶
503 upstream_breaker_open¶
Cause. The provider failed five times in a row and the circuit breaker opened. Calls are refused without reaching the provider until the cool-down ends.
Fix. Restore the provider. The breaker closes by itself after a successful probe. Meanwhile
the Sleeper reports throttled, which is healthy, and memories wait in the queue.
The provider rejects requests with 400 "Unrecognized request arguments"¶
Cause. The provider slug is spt-models or vllm while the endpoint is a strict
OpenAI-compatible API. For those two slugs the proxy sends vLLM extensions
(chat_template_kwargs, guided_json).
Fix. Select the preset that matches the endpoint, or custom.
409 embedder_change_requires_purge when saving inference settings¶
Cause. The request changes the embedder model or its dimension. Existing vectors would become unusable.
Fix. Decide whether you really want to change the embedder. If so, send
purge_acknowledged: true, then purge every brain and ingest its content again.
The provider key is empty after a change of secrets¶
Cause. spongram logs decrypt failed — returning empty string (token rotated?). The
stored key was encrypted with a different SPONGRAM_ENCRYPTION_KEY, or with a key derived from
a previous SPONGRAM_ADMIN_TOKEN.
Fix. Restore the original encryption key. If it is lost, set a stable
SPONGRAM_ENCRYPTION_KEY and enter the provider key again on the Settings page.
Features¶
The persona marketplace page is missing from the admin UI¶
Cause. The page exists only when GET /admin/api/spongram/features answers
"marketplace": true. That requires SPONGRAM_MARKETPLACE_ENABLED and
SPONGRAM_PERSONAS_ENABLED to be on, on a server; the desktop edition never has it. With the
flag off the marketplace routes are not mounted and answer 404.
Fix. Turn both flags on and restart (Feature flags). If the page is
there but an Organisation catalogue is missing, look for marketplace: source ignorée (dossier
absent) in the log: the directory named in SPONGRAM_MARKETPLACE_DIRS is not mounted in the
container, or exists only on another node.
Langfuse receives no trace¶
| Cause | How to recognise it | Fix |
|---|---|---|
| The Langfuse server is older than 4.59.0 | Start log: langfuse tracing désactivé : serveur …, le SDK v5 exige >= 4.59.0 |
Upgrade the server, or use Langfuse Cloud |
| The switch is off | SPONGRAM_LANGFUSE_ENABLED is false (the stack file's default) |
Set it to true |
| No URL | LANGFUSE_BASE_URL and LANGFUSE_HOST are empty |
Set the origin of your server, without /api |
| Keys or URL changed without a restart | The client is created once per process | Restart spongram |
| The variables do not reach the container | On Compose, .env values are passed only if the Compose file references them |
Add them in a docker-compose.override.yml |
A flag set in .env has no effect¶
Cause. The spongram service of the Compose file receives only the variables its
environment: block interpolates.
Fix. Add the variable to a docker-compose.override.yml and check with
docker compose exec spongram env. See Feature flags.