{"record":{"id":"9ae6f476f9ef55d5","repo":"mem0ai/mem0","slug":"timed-out-waiting-for-databricks-endpoint-this-e","errorCode":null,"errorMessage":"Timed out waiting for Databricks endpoint ${this.endpointName} to become ready.","messagePattern":"Timed out waiting for Databricks endpoint (.+?) to become ready\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"mem0-ts/src/oss/src/vector_stores/databricks.ts","lineNumber":1231,"sourceCode":"\n      if (state === \"ONLINE\") {\n        return;\n      }\n\n      if (typeof state !== \"string\") {\n        throw new Error(\n          \"Databricks endpoint status did not report a state during initialization.\",\n        );\n      }\n\n      if (this.syncPollIntervalMs > 0) {\n        await new Promise((resolve) =>\n          setTimeout(resolve, this.syncPollIntervalMs),\n        );\n      }\n    }\n\n    throw new Error(\n      `Timed out waiting for Databricks endpoint ${this.endpointName} to become ready.`,\n    );\n  }\n\n  private async waitForIndexReadiness(): Promise<void> {\n    const deadline = Date.now() + this.syncTimeoutMs;\n\n    while (Date.now() <= deadline) {\n      const response = await this.httpClient.get(\n        `/indexes/${encodeURIComponent(this.fullIndexName)}`,\n      );\n      const ready = response?.data?.status?.ready;\n\n      if (ready === true) {\n        return;\n      }\n\n      if (ready !== false) {","sourceCodeStart":1213,"sourceCodeEnd":1249,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0-ts/src/oss/src/vector_stores/databricks.ts#L1213-L1249","documentation":"Thrown by the Databricks vector store after waitForEndpointReadiness() polls the Databricks Vector Search endpoint status until syncTimeoutMs expires without reaching a ready state. The loop only exits early when the API reports a ready state; any other state keeps polling until the deadline. This is a provisioning-wait timeout, not a network failure.","triggerScenarios":"Constructing the DatabricksDB vector store (or any operation that triggers endpoint initialization) when the Databricks Vector Search endpoint is still PROVISIONING or stuck in a non-ready state for longer than syncTimeoutMs (set via config). Also triggered when syncTimeoutMs is set too low relative to Databricks endpoint provisioning time (often 5-15 minutes).","commonSituations":"First run against a new Databricks workspace where the endpoint must be provisioned from scratch; a default syncTimeoutMs that is shorter than Databricks provisioning time; endpoint scaled to zero and restarting; Databricks UI showing the endpoint in PROVISIONING while the SDK keeps polling.","solutions":["Increase syncTimeoutMs in the Databricks vector store config (e.g. 900000 for 15 minutes) to cover endpoint provisioning time.","Check the endpoint state in the Databricks workspace (Vector Search > Endpoints) and confirm it reaches ONLINE/ready before starting the app.","Pre-provision the endpoint once via the Databricks UI or API outside your app so subsequent runs only verify readiness.","Verify this.endpointName matches an existing endpoint; a typo means it never becomes ready."],"exampleFix":"// before\nconst store = new DatabricksDB({\n  endpointName: 'my-endpoint',\n  // default syncTimeoutMs too short for cold provisioning\n});\n\n// after\nconst store = new DatabricksDB({\n  endpointName: 'my-endpoint',\n  syncTimeoutMs: 15 * 60 * 1000, // wait up to 15 min for provisioning\n  syncPollIntervalMs: 10_000,\n});","handlingStrategy":"retry","validationCode":"// Before constructing the store, check endpoint state via Databricks API\n// (assumes an axios/http client with workspace auth):\nconst res = await client.get(`/api/2.0/vector-search/endpoints/${encodeURIComponent(endpointName)}`);\nconst state = res?.data?.endpoint_status?.state;\nif (state !== 'ONLINE' && state !== 'ENDPOINT_READY') {\n  // wait or provision before creating DatabricksDB\n}","typeGuard":null,"tryCatchPattern":"try {\n  const store = new DatabricksDB(config);\n  await store.init?.();\n} catch (e) {\n  if (e instanceof Error && e.message.includes('Timed out waiting for Databricks endpoint')) {\n    // endpoint provisioning is slow: lengthen timeout and retry once\n    await new Promise(r => setTimeout(r, 60_000));\n    return initStore({ ...config, syncTimeoutMs: config.syncTimeoutMs * 2 });\n  }\n  throw e;\n}","preventionTips":["Pre-provision the Databricks Vector Search endpoint before app startup so initialization only verifies readiness.","Set syncTimeoutMs generously (>= 15 min) for cold-start workspaces; shrink it once the endpoint stays warm.","Monitor endpoint state in the Databricks UI during first integration runs."],"tags":["databricks","timeout","provisioning","vector-store","typescript"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}