{"record":{"id":"9592cb5243a9ca5b","repo":"Mintplex-Labs/anything-llm","slug":"this-name-invalid-heartbeat-received-is-the-9592cb","errorCode":null,"errorMessage":"${this.name}::Invalid Heartbeat received - is the instance online?","messagePattern":"(.+?)::Invalid Heartbeat received - is the instance online\\?","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/vectorDbProviders/zilliz/index.js","lineNumber":28,"sourceCode":"    super();\n  }\n\n  get name() {\n    return \"Zilliz\";\n  }\n\n  async connect() {\n    if (process.env.VECTOR_DB !== \"zilliz\")\n      throw new Error(`${this.name}::Invalid ENV settings`);\n\n    const client = new MilvusClient({\n      address: process.env.ZILLIZ_ENDPOINT,\n      token: process.env.ZILLIZ_API_TOKEN,\n    });\n\n    const { isHealthy } = await client.checkHealth();\n    if (!isHealthy)\n      throw new Error(\n        `${this.name}::Invalid Heartbeat received - is the instance online?`\n      );\n\n    return { client };\n  }\n}\n\nmodule.exports.Zilliz = Zilliz;\n","sourceCodeStart":10,"sourceCodeEnd":37,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/utils/vectorDbProviders/zilliz/index.js#L10-L37","documentation":"Zilliz provider (Milvus SDK). connect() builds a MilvusClient with ZILLIZ_ENDPOINT/ZILLIZ_API_TOKEN and calls client.checkHealth(); when the probe reports isHealthy false this templated error (\"Zilliz::Invalid Heartbeat received...\") is thrown — the SDK could ask, but the cluster answered unhealthy.","triggerScenarios":"ZILLIZ_ENDPOINT unreachable or mistyped; cluster paused/hibernated (typical of Zilliz Cloud free tier); invalid/expired ZILLIZ_API_TOKEN making the health call fail; self-hosted Milvus internal dependencies (etcd/MinIO) down; network egress blocked to the endpoint.","commonSituations":"Zilliz Cloud free cluster auto-paused after inactivity; token rotated but .env not updated; self-hosted Milvus still starting up; firewall blocking ports 443/19530; endpoint copied with a typo or extra path.","solutions":["Check the cluster state in the Zilliz/Milvus console and resume it if paused","Regenerate/verify ZILLIZ_API_TOKEN and confirm ZILLIZ_ENDPOINT matches the console's connection info exactly","Probe reachability from the app host (curl https://<endpoint>/health or a Milvus health check) to rule out network/firewall","For self-hosted Milvus, wait until all dependencies report healthy before starting/retrying AnythingLLM"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"async function zillizReachable(endpoint) {\n  try {\n    const res = await fetch(`${endpoint.replace(/\\/$/, \"\")}/health`);\n    return res.ok;\n  } catch { return false; }\n}\nif (!(await zillizReachable(process.env.ZILLIZ_ENDPOINT)))\n  throw new Error(\"Zilliz endpoint unreachable — check cluster state/paused tier\");","typeGuard":null,"tryCatchPattern":"let lastErr;\nfor (let i = 0; i < 3; i++) {\n  try { return await zilliz.connect(); }\n  catch (e) {\n    lastErr = e;\n    if (!/Heartbeat/.test(e.message)) throw e;\n    await delay(1000 * (i + 1)); // cluster may be resuming\n  }\n}\nthrow lastErr;","preventionTips":["Keep Zilliz clusters on a paid/always-on tier or expect resume-on-first-traffic latency and retry accordingly","Wrap every long job with a health preflight so a paused cluster fails fast with a clear cause","Rotate tokens through the same env var the app reads and restart after updates"],"tags":["zilliz","milvus","vector-db","health-check","connectivity"],"backgroundTag":"service-unreachable","analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}