MongoDB Atlas Serverless Timeout

I migrate to Serverless and I wish I hadn’t done that. My ASP.NET Core 8 apps hosted on azure app services keeps throwing “Unable to read data from the transport connection: Connection timed out.” exception, we’re using the latest mongodb driver everything was working well before we migrated to Serverless. How can we solve this problem?

Hi there

I recommend that you chat with support to help debug the issue. You can click on “Chat now” on this page to start your chat. Please feel free to DM me if you have any further questions.

Thanks,
Anurag

Update: It turned out that we were aggressively creating many MongoClient objects in a core function. We fixed the bug by injecting a singleton MongoClient object. Sorry for bothering @Anurag_Kadasne

P.S> We didn’t notice any timeout errors when were using the Shared plan

2 Likes

Hi @Anurag_Kadasne,

Unfortunately the problem re-appeared today, we’ve done an intensive tests to make sure we only consume one MongoClient object in our code base. I hope if you can recommend something we can do or try.

Thanks