Score:0

Why are my Azure VMs briefly unable to connect to an AZure Managed Instance?

eh flag

I have a bunch of load-balanced Azure VMs running Windows Server 2019 that are running IIS with ASP.NET MVC/Web API 2 applications running on them. They communicate with a Database in a SQL Server Managed Instance.

The VMs and the Managed Instance are in separate subnets with the same Virtual Network, and most of the time, it all works perfectly.

However, a few times per day, seemingly randomly, all of the AS.NET apps will start logging timeout errors while trying to connect to the database or to perform an operation on an already-open connection. Every single one of them.

A few minutes later, everything just starts working normally, which is cool, but the outage time is extremely bothersome to my customers, and we just experienced one that brought us down for a good 45 minutes.

I have no idea what is going on our even how to approach troubleshooting it.

ng flag
Have you checked your managed instance performance stats, it may be that it is overloaded, or not responding for that period.
Score:0
in flag

Working with organizations that use Azure SQL Managed Instance and get timeouts, I have found most of the time the issue is query tuning or index tuning is needed.

Sometimes you see some queries produce timeouts but a minute later you execute them and execute well. Avoid clustered index scans on big tables. Focus query tuning on top queries using memory and CPU.

Make sure errors saying "memory pressure" are not present on the last 7 Error Logs on that instance.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.