Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiencing timeouts with Atlas Serverless cluster #10

Open
johnknoop opened this issue Jun 10, 2022 · 0 comments
Open

Experiencing timeouts with Atlas Serverless cluster #10

johnknoop opened this issue Jun 10, 2022 · 0 comments

Comments

@johnknoop
Copy link

Hi

We've been using this library for years with our classic Atlas cluster, but since switching to an Atlas Serverless cluster, we've started seeing intermittent timeout exceptions:

MongoDB.Driver.MongoConnectionException: An exception occurred while receiving a message from the server.
---> System.TimeoutException: The operation has timed out.
at MongoDB.Driver.Core.Misc.StreamExtensionMethods.ReadAsync(Stream stream, Byte[] buffer, Int32 offset, Int32 count, TimeSpan timeout, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Misc.StreamExtensionMethods.ReadBytesAsync(Stream stream, Byte[] buffer, Int32 offset, Int32 count, TimeSpan timeout, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Connections.BinaryConnection.ReceiveBufferAsync(CancellationToken cancellationToken)

The application is an Azure App Service, and the pattern of failures is that all requests succeed until there's a period of idling, after which the next one will timeout.

At first, I didn't consider the possibility that it had anything to do with this library, so I reached out to the MongoDB Atlas team and wondered if they are aware of any issues related to slow cold starts or similar. But they suggested that I try and see if I can reproduce it when creating a MongoClient directly without using this library, so for the last couple of days, I've been switching back and forth and I can indeed confirm that the timeouts only occur when this library is used.

Do you have any clue why this would happen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant