Skip to content

DEADLINE_EXCEEDED on checkCollectionLimit() - gRPC timeout on collection creation (Free tier, macOS) #289

@gvorwaller

Description

@gvorwaller

Bug Description

Consistent DEADLINE_EXCEEDED error when attempting to index a codebase. The error occurs during the pre-flight checkCollectionLimit() call before any actual indexing begins. A different codebase on the same cluster was successfully indexed 4 days prior.

Environment

  • OS: macOS Darwin 25.3.0 (Apple Silicon)
  • Node.js: v24.3.0
  • Package: @zilliz/claude-context-mcp@0.1.6
  • Zilliz Cloud: Free tier, gcp-us-west1, Milvus 2.6.x compatible
  • Cluster: in03-e63f077fc4f1b69

Cluster State

  • Collections: 1 of 5 allowed (hybrid_code_chunks_9429127a, status: Loaded)
  • Storage: 0.01 GB of 5 GB
  • Read vCUs: ~12 (minimal load)
  • No resource limits hit

Error

Error validating collection creation: 4 DEADLINE_EXCEEDED: Deadline exceeded after 15.001s,remote_addr=34.111.198.99:443

Root Cause Trace

The error originates in milvus-vectordb.js:607 (checkCollectionLimit()), which creates a dummy collection as a pre-flight limit check:

async checkCollectionLimit() {
    const collectionName = `dummy_collection_${Date.now()}`;
    // creates a trivial 2-field collection, then drops it
    await this.client.createCollection(createCollectionParams);  // <-- times out here
}

This is called from handlers.js:249 before any real indexing starts:

const canCreateCollection = await this.context.getVectorDatabase().checkCollectionLimit();

The MilvusClient at milvus-vectordb.js:20 is created with no timeout parameter, so the 15s gRPC deadline is the SDK default.

Reproduction Steps

  1. Have an existing indexed codebase (collection loaded and working)
  2. Attempt to index a second, different codebase: index_codebase({ path: "/path/to/project" })
  3. Consistently fails with DEADLINE_EXCEEDED on the checkCollectionLimit() dummy collection creation
  4. Tried with both ast and langchain splitters, with and without force: true, with and without ignorePatterns — all produce the same error
  5. Indexing a subdirectory also fails identically

Key Observation

  • Another codebase (~/gaylonphotos, 297 files, 1241 chunks) was successfully indexed on this same cluster on Mar 22, 2026
  • The failing codebase (~/BTC-dashboard) was previously indexed (196k chunks, Feb 20) but was cleared during a force-reindex attempt
  • Since then, every attempt to create any new collection times out
  • get_indexing_status confirms the codebase is not indexed
  • clear_index confirms nothing to clear

Related

Suggested Improvements

  1. Configurable gRPC timeout — allow setting a timeout > 15s via env var (e.g., MILVUS_TIMEOUT_MS)
  2. Skip dummy collection checkcheckCollectionLimit() could use listCollections() + count instead of create/drop, avoiding the gRPC-heavy collection creation path
  3. REST API fallbackMilvusRestfulVectorDatabase exists in claude-context-core but isn't wired up as a fallback when gRPC fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions