Hi, @Hermann_Baumgartl,
Thank you for reproducing the problem and checking the replica set name in the TXT record and from the heartbeat.
The cold start time for a MongoClient
is on the order of a few hundred milliseconds. This includes DNS lookups, establishing monitoring connections to cluster members, and creating an authenticated connection in the connection pool. So it is unexpected that MongoClient
creation would take around 30 seconds.
When the creation is fast (<1s), I would not expect a timeout exception to be thrown either. The MongoClient
will block discovering the cluster topology while performing server selection so that the operation can be routed to the correct node.
This is definitely worth digging into deeper and opening a support case is the right way to go. Our Support Team will loop in the .NET/C# Team as needed during the investigation.
Sincerely,
James