My app services functions are unable to connect to the MongoDB Atlas Cluster. It says timeout error after 5 min or running the function.
https://ap-south-1.aws.data.mongodb-api.com/app/application-0-gehyd/endpoint/challeneges
{"error":"error connecting to MongoDB service cluster: failed to ping: server selection error: server selection timeout, current topology: { Type: ReplicaSetNoPrimary, Servers: [{ Addr: ac-eaixugi-shard-00-00.imlgvju.mesh.mongodb.net:30432, Type: Unknown, Last error: connection() error occurred during connection handshake: EOF }, { Addr: ac-eaixugi-shard-00-01.imlgvju.mesh.mongodb.net:30432, Type: Unknown, Last error: connection() error occurred during connection handshake: EOF }, { Addr: ac-eaixugi-shard-00-02.imlgvju.mesh.mongodb.net:30432, Type: Unknown, Last error: connection() error occurred during connection handshake: EOF }, ] }","error_code":"MongoDBError","link":"https://realm.mongodb.com/groups/63afccf231ce5803706ebf68/apps/63b26fab2ea25bc6a60771d6/logs?co_id=63b27aa92ea25bc6a6099ecf"}
1 Like
Facing similar errors even from the App Services Web UI as well as Data API enabled on the cluster.
Errors for the web UI
Errors for the Data API using postman:
FunctionError: function execution did not succeed with error ‘error connecting to MongoDB service cluster: failed to ping: server selection error: server selection timeout, current topology: { Type: Unknown, Servers: [{ Addr: ac-g7u06db-shard-00-00.rfm6gai.mesh.mongodb.net:30536, Type: Unknown, Last error: connection() error occurred during connection handshake: EOF }, { Addr: ac-g7u06db-shard-00-01.rfm6gai.mesh.mongodb.net:30536, Type: Unknown, Last error: connection() error occurred during connection handshake: EOF }, { Addr: ac-g7u06db-shard-00-02.rfm6gai.mesh.mongodb.net:30536, Type: Unknown, Last error: connection() error occurred during connection handshake: EOF }, ] }’ after 15 attempt(s) over 160.5 second(s)"
Edit 1:
Just now got TLS error from the Web UI
Hi Shrey,
My app services functions are unable to connect to the MongoDB Atlas Cluster. It says timeout error after 5 min or running the function.
The max runtime for functions is currently 180 seconds.
Regarding the error, are you on a shared tier cluster?
It’s possible that the error could be due to a resource issue on the cluster and frequency of issues will depend on neighbouring clusters sharing the same resources.
Regards
Manny
This was an issue with MongoDB platform itself, got resolved in 2-3 hours…
I was running free tier with a collection of just 10 docs and testing something 
1 Like
Thanks for confirming! If there are any outages on the platform, the page below will have the details.