Share via

Unable to connect to Azure Cosmos DB (Mongo vCore cluster).

Animesh 0 Reputation points
2026-04-25T09:58:55.33+00:00

Issue: - Connection fails from mongosh, MongoDB Compass, and Node.js app - Error: "error connecting to server" - Issue is reproducible across multiple users and environments - It was working earlier, recently stopped Observations: - Cluster status currently shows "Updating" - Public network access is enabled - Firewall is open Request: - Does "Updating" state block client connections? - How long does update typically take? - How to verify cluster health and readiness?

Azure Cosmos DB
Azure Cosmos DB

An Azure NoSQL database service for app development.


1 answer

Sort by: Most helpful
  1. Vinodh247 42,206 Reputation points MVP Volunteer Moderator
    2026-04-25T10:45:43.33+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    Yes, the “Updating” state in Cosmos DB for MongoDB vCore can block or intermittently fail client connections. During this phase, the cluster is undergoing configuration changes (scale, patching, networking, or maintenance), and the service may temporarily reject or drop connections. So your observed “error connecting to server” across mongosh, Compass, and Node.js is consistent with this state.

    Update duration is not fixed. In practice, it usually takes 5 to 30 mins for minor changes, but can extend to 45 to 60 mins or more if it involves scaling, storage reconfiguration, or backend maintenance. If it has been stuck beyond an hour, that is a red flag and likely indicates a backend issue.

    To verify health and readiness, check the cluster state in the Azure portal until it shows “Running” (not updating). Then validate via connection string using mongosh, check metrics like CPU, connections, and server errors in Azure Monitor, and review Activity Log for recent operations (scale, patch, failover). You can also try a simple ping command (db.runCommand({ ping: 1 })) once status is Running. If it remains in Updating or connections still fail after it returns to Running, escalate to support because vCore clusters can get stuck in a partial update state.

     

    Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.