Hi, we have an application running in Azure AKS which connects to a Mongo Atlas database through a vnet-peered network. Things work well for the most part, but from time to time (once a week to every two days) the application seems to get stuck in a bad place and the only way out is restarting the failing pod.
When the application gets into the “bad place”, all attempts at a database connection result in
Failed to look up SRV record "_mongodb._tcp.somedomain-pri.abcde.mongodb.net": No such file or directory
This should not be an infrastructure DNS problem because the database connection works in most cases. And immediately after this problem occurs, after the pod is restarted, it works again.
Our stack is PHP8, Symfony+Doctrine ODM2, mongodb ext 1.9.1, Atlas version 4.4
Any ideas on why this could be happening?
Thanks in advance