Describe the bug
GET /api/v2/health returns 200 {"status": "healthy", ...} when the vector store cannot be reached, so a server that cannot store or search episodic memory is reported as healthy. Seen on main at ad8ff24.
The handler returns a constant and checks no dependency (packages/server/src/memmachine_server/server/api_v2/router.py:1097):
@router.get("/health", description=RouterDoc.HEALTH_CHECK, tags=["System"])
async def health_check() -> dict[str, str]:
"""Health check endpoint for container orchestration."""
return {
"status": "healthy",
"service": "memmachine",
"version": get_version().server_version,
}
Its docstring says it is for container orchestration, and the repo's own docker-compose.yml uses it as the MemMachine container's healthcheck:
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "http://localhost:8080/api/v2/health"]
So Docker, a load balancer, or a Kubernetes probe pointed at this endpoint keeps the instance in service while its episodic adds and searches fail.
Steps to reproduce
- Start MemMachine with the event-memory backend on PostgreSQL and Qdrant (
docker-compose.yml, Qdrant profile).
- Confirm it is healthy and works:
GET /api/v2/health returns 200, and an add and a search succeed.
- Make Qdrant unreachable without closing its port:
docker pause <qdrant container>.
- Call
GET /api/v2/health. It answers 200 {"status": "healthy", ...}.
- Call
POST /api/v2/memories/search on an existing project. It fails.
Describe the bug
GET /api/v2/healthreturns200 {"status": "healthy", ...}when the vector store cannot be reached, so a server that cannot store or search episodic memory is reported as healthy. Seen onmainatad8ff24.The handler returns a constant and checks no dependency (
packages/server/src/memmachine_server/server/api_v2/router.py:1097):Its docstring says it is for container orchestration, and the repo's own
docker-compose.ymluses it as the MemMachine container's healthcheck:So Docker, a load balancer, or a Kubernetes probe pointed at this endpoint keeps the instance in service while its episodic adds and searches fail.
Steps to reproduce
docker-compose.yml, Qdrant profile).GET /api/v2/healthreturns 200, and an add and a search succeed.docker pause <qdrant container>.GET /api/v2/health. It answers200 {"status": "healthy", ...}.POST /api/v2/memories/searchon an existing project. It fails.