We are using .NET 6 web api inside docker container on linux. Our issue is that sometimes randomly mongodb driver Find() function hangs for 16 minutes. The function call does not fail. We are using mongodb atlas and mongodb driver v 2.15.1 from nuget.
I have tried debugging mongo with shell but there is not any ongoing queries when the find function is hanging.
Our request flow Frontend => NginX => reverseproxy to web api that is in docker container.
The fun part is that when you use and navigate the web page continuously that calls the web api none of the request left pending/hanging but if you idle on the page for few minutes and again stat to use page and navigate one request goes to pending and hangs for 16 minutes.
ReadTimeoutlike with 1 min. Will it help?