{"record":{"id":"d84b6d873335e7e5","repo":"Mintplex-Labs/anything-llm","slug":"pinecone-index-not-ready","errorCode":null,"errorMessage":"Pinecone::Index not ready.","messagePattern":"Pinecone::Index not ready\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/vectorDbProviders/pinecone/index.js","lineNumber":30,"sourceCode":"    super();\n  }\n\n  get name() {\n    return \"Pinecone\";\n  }\n\n  async connect() {\n    if (process.env.VECTOR_DB !== \"pinecone\")\n      throw new Error(\"Pinecone::Invalid ENV settings\");\n\n    const client = new Pinecone({\n      apiKey: process.env.PINECONE_API_KEY,\n    });\n\n    const pineconeIndex = client.Index(process.env.PINECONE_INDEX);\n    const { status } = await client.describeIndex(process.env.PINECONE_INDEX);\n\n    if (!status.ready) throw new Error(\"Pinecone::Index not ready.\");\n    return { client, pineconeIndex, indexName: process.env.PINECONE_INDEX };\n  }\n\n  async totalVectors() {\n    const { pineconeIndex } = await this.connect();\n    const { namespaces } = await pineconeIndex.describeIndexStats();\n\n    return Object.values(namespaces).reduce(\n      (a, b) => a + (b?.recordCount || 0),\n      0\n    );\n  }\n\n  async namespaceCount(_namespace = null) {\n    const { pineconeIndex } = await this.connect();\n    const namespace = await this.namespace(pineconeIndex, _namespace);\n    return namespace?.recordCount || 0;\n  }","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/utils/vectorDbProviders/pinecone/index.js#L12-L48","documentation":"Readiness guard in PineconeDB.connect: describeIndex reported status.ready as false, so the configured Pinecone index exists but is still initializing or in an error state and cannot accept vector operations yet.","triggerScenarios":"The Pinecone index is not in a ready state.","commonSituations":"This error is raised at runtime in server/utils/vectorDbProviders/pinecone/index.js. It occurs when the required configuration for this provider is missing or invalid (unset environment variables, empty API key or base path), when the external service is unreachable or returns an unexpected response, or when invalid input reaches the call site. To prevent it, validate the relevant provider settings and environment variables at startup and confirm the service is reachable before this code path executes.","solutions":["Wait for the Pinecone index to finish provisioning and retry.","Check the index status in the Pinecone console."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}