Frequent connection errors to MongoDB Atlas Data API

We’ve been evaluating Atlas Data API for a month for a large organization and have encountered frequent connection errors of the following type. This is making the same api call over and over, to find documents using a simple query.

(1) It works most of the time but the error rate is unreasonbly high.

(2) For some reason, connection times to the MongoDB Atlas (as measured in curl) range from 30ms to 2000 ms. It’s all over the map. This is from multiple different networks.

(3) If we don’t connect for more than 10 minutes, it’s worse. It seems like there is some “cold start” problems here?

(4) Frequently, we just don’t connect. It times out.

(5) Also, we get errors like this frequently:

"Failed to find documents: FunctionError: error connecting to MongoDB service cluster: failed to ping: server selection error: server selection timeout, current topology: { Type: ReplicaSetNoPrimary, Servers: [{ Addr: ac-enp76f9-shard-00-00.phqqzpw.mesh.mongodb.net:30454, Type: RSSecondary, Tag sets: region=US_EAST_1,nodeType=ELECTABLE,provider=AWS,workloadType=OPERATIONAL, Average RTT: 2047239 }, { Addr: ac-enp76f9-shard-00-01.phqqzpw.mesh.mongodb.net:30454, Type: Unknown, Last error: connection() error occurred during connection handshake: dial tcp: lookup ac-enp76f9-shard-00-01.phqqzpw.mesh.mongodb.net: i/o timeout }, { Addr: ac-enp76f9-shard-00-02.phqqzpw.mesh.mongodb.net:30454, Type: Unknown, Last error: connection() error occurred during connection handshake: dial tcp: lookup ac-enp76f9-shard-00-02.phqqzpw.mesh.mongodb.net: i/o timeout }, ] }"

We’ve written into support and they’ve said they can’t help us unless we sign up for a paid support plan.

We are evaluating the product, so it seems premature to start to pay for support when simple tests like this are showing such a high failure rate.

We were excited about the Data API and hope Mongo will address these issues in some way?