mem0ai/mem0 · error · Error

Timed out waiting for Databricks index ${this.fullIndexName}

Error message

Timed out waiting for Databricks index ${this.fullIndexName} to become ready after sync.

What it means

Thrown by waitForIndexReadiness() when the index status reports ready === false for the entire syncTimeoutMs window after a sync operation. Databricks vector search indexes take time to sync after writes, and this error means the polling budget was exhausted before the index converged to ready.

Source

Thrown at mem0-ts/src/oss/src/vector_stores/databricks.ts:1262

      if (ready === true) {
        return;
      }

      if (ready !== false) {
        throw new Error(
          "Databricks index status did not report a readiness flag after sync.",
        );
      }

      if (this.syncPollIntervalMs > 0) {
        await new Promise((resolve) =>
          setTimeout(resolve, this.syncPollIntervalMs),
        );
      }
    }

    throw new Error(
      `Timed out waiting for Databricks index ${this.fullIndexName} to become ready after sync.`,
    );
  }

  private shouldPaginateForLocalFiltering(filters?: SearchFilters): boolean {
    if (!filters || Object.keys(filters).length === 0) {
      return false;
    }

    for (const [key, value] of Object.entries(filters)) {
      if (key === "$and") {
        if (!Array.isArray(value)) {
          return true;
        }
        if (
          value.some(
            (entry) =>
              !isPlainObject(entry) ||

View on GitHub (pinned to 001c235229)

Solutions

  1. Increase syncTimeoutMs in config to accommodate large syncs (e.g. 600000+ for bulk loads).
  2. Split very large inserts into smaller batches so each sync converges faster.
  3. Check the index sync status in the Databricks UI (Vector Search > Indexes) to confirm it eventually reaches ready; if it does, it is purely a timeout budget issue.
  4. If the index stays not-ready indefinitely, inspect the index's source table / delta pipeline for failures before retrying.

Example fix

// before
await store.insert(vectors, ids, payloads); // one huge batch, default timeout

// after
const batchSize = 100;
for (let i = 0; i < vectors.length; i += batchSize) {
  await store.insert(
    vectors.slice(i, i + batchSize),
    ids.slice(i, i + batchSize),
    payloads.slice(i, i + batchSize),
  );
}
Defensive patterns

Strategy: retry

Try / catch

try {
  await store.insert(batchVectors, batchIds, batchPayloads);
} catch (e) {
  if (e instanceof Error && e.message.includes('Timed out waiting for Databricks index')) {
    // check index in Databricks UI; if it eventually becomes ready, this was a budget issue:
    // shrink batches and/or raise syncTimeoutMs, then retry this batch
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling insert/update on the Databricks vector store with a large payload (batch insert, memory history load) where index sync takes longer than syncTimeoutMs; or a small syncTimeoutMs combined with a slow index.

Common situations: Initial bulk load of memories into a fresh Databricks Vector Search index; delta sync indexes with large changed datasets; syncTimeoutMs left at a default too small for first-load volumes; underlying Databricks sync backlog on the workspace.

Understand the failure class

Related errors


AI-assisted analysis of mem0ai/mem0@001c235229 (2026-08-15). Data as JSON: /api/errors/df5381c9ea5f982e. Report an issue: GitHub.