What to do when Azure SQL Server stops accepting connections
Come with me on a journey.
It's 2023. Your team has recently released a major update and it's been a rocky launch. The last few days have been a lot of running and fighting fires. You're knackered. You come to work and today, you're the first person in. Time to start trying to figure out what is going on with that database table that's showing some weird data.
You log in to SQL Studio Management Studio and make a couple of benign SELECT TOP 100 * FROM table; type queries. Suddenly, your connection closes. Weird. You try to log in. The database is refusing connections. You start to worry. You check the resource in Azure Portal. Everything seems fine. Nobody's messed with your networking settings.
Your phone buzzes. Alert! Production failed requests exceed threshold.
Holy shit.
What do you do? It's a SQL server in Azure, the whole POINT of a managed SQL box is it doesn't die so you don't have the option to restart it. It's 8:15, nobody else is on deck yet.
Team lead walks in. Thank god for that! But he's never seen this before either. A few frantic phone calls up the chain later someone suggests, "What if we scale the database up and back?"
Hell, you don't have any better ideas. Bump the server up a tier. Everybody crosses their fingers and toes.
Your phone buzzes. Production failed requests alert resolved.
You connect to the database with SSMS.
You scale the server back down a tier.
You never see this again.
What a Monday.