Unable to understand sudden increase in costs for Azure SQL database

Gary McGill 116 Reputation points
2021-11-30T00:07:33.527+00:00

I have an Azure SQL database set up for a website I'm building. The website is not live yet, and I'm the only person using it in test - consequently the database is hardly used at all. The database is also very small (probably less than 100 records across half a dozen tables). The database usage shows as 0%.

The database is set up to use the default "General Purpose" service tier, and the "Serverless" compute tier. The estimated storage cost per month is 5.5 USD and the estimated compute cost is 0.000181 USD. Which would be fine.

However, I just looked at the actual costs I'm racking up, and it's horrific. In the whole of the first half of November it racked up about 2.5 USD in total, but since mid-November it has been racking up about 10 USD per DAY. I have no idea why, and I can't find a detailed breakdown.

This level of expense is about 10x what I was expecting, and far beyond the budget that I can spend - but I have no idea how to reduce the cost. None of the configuration pages seem to have any cheaper tiers or options.

Unless I can find a way to get these costs back down to where they were, I will likely have to abandon hosting my website on Azure, which given the amount of time I've spent on it is heartbreaking.

Can anyone suggest a way to configure a cheaper plan, or suggest why my charges suddenly went through the roof?

Azure SQL Database
Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
2,028 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ronen Ariely 15,096 Reputation points
    2021-11-30T02:08:07.59+00:00

    Good day,

    ... 10 USD per DAY...

    Yes... according to your description this sound high

    The website is not live yet, and I'm the only person using it in test

    Since this is not a production database yet, then:

    (1) monitoring the issue should be simple.

    1.1 Activate Extended Events and monitor what and who is happen in your database. Monitor queries executions and if you use Auto-pause then monitor when the database wakeup

    1.2 Check this doc about monitoring the database
    https://learn.microsoft.com/en-us/azure/azure-sql/database/monitor-tune-overview

    Check this as well:
    https://learn.microsoft.com/en-us/azure/azure-sql/database/intelligent-insights-overview

    Note: remember that the cost for a serverless database can raise above the cost of simple Provisioned database per seconds when both are active. serverless is good if you have big differences in uses (unpredictable usage patterns) like case where most of the time the database is not in-used. Test the option of using other tiers like Basic or S0 maybe.

    (2) Check if your cost it coming from specific database and not from the replica or other services like backup, security and so on. Remember for example that Zone redundant database will cost about twice.

    (3) Check if you have Long-term retention

    (4) re-check that your pricing tier was not changed to Business Critical service tier which cost about 3 times more (I had a client which had this mistake)

    (5) try to enable Auto-pause (it makes no sense that you work 24/7 and since only you use the database, this might fit your needs). If you did, then remember that if someone execute a simple query like "select 1" every minute, then the server might stay in active mode and your cost get very high even so there is almost no actives.


0 additional answers

Sort by: Most helpful