Recently, I had a client sign up for a Windows Azure account getting the first 90 days for free. This free account gives you a 1GB SQL Azure Web edition database, 50,000 storage transactions and 750 small compute hours. This should be plenty for the next couple of months, or so I thought.
This is a simple application that uses a small SQL Azure database and Blob Storage for uploaded images. After the Azure account was provisioned, I created the Hosted Service, Storage Account, SQL server and the publish Certificate. Then I updated Visual Studio and deployed the application to Azure. The initial testing went great, uploaded a few images, ran a few queries, no problems at all.
The next morning the site is down. So I logged into the management portal and discovered that the account had been suspended due to exceeding the constraints of the free account. Well, It’s nice that instead of ending up with a large bill at the end of the month you can set spending limits and have your account suspended when that amount is exceeded. In this case, the spending limit defaulted to $0.00 for the first 90 days. The new Azure billing portal is quite helpful and shows exactly what happened. I exceeded the 50,000 storage transactions limit IN ONE DAY! The only thing I use storage for is uploaded images. How could I have used that many reads, writes and deletes in one day. Well, it turns out I didn’t.
The first issue I noticed was the error log showing that the google and bing bots could not locate the robots.txt file. Of course…it’s a new site and these bots are crawling all over it attempting to index the pages. So I added a robots.txt to prevent image bots from indexing the images.
This helped a little but I was still getting 60,000+ storage transactions a day. So I submitted Windows Azure Incident ticket explaining my problem.
A few hours later I received an email from the Windows Azure Help Desk
To: Randy Patterson
Cc: MSSolve Case Email
Subject: RE: Callback:why 100,000 storage transactions a day
After looking at the logs It looks like WAD logging is enabled in your deployment and this will use at least 25 trx/min
Please check if this is enabled in your deployment. If so you will have to uncheck enable diagnostics to avoid the transactions.
Starting with version 1.6 of the Azure SDK, Diagnostics is enabled by default. According to the email, diagnostics activity will generate a minimum of 36,000 transactions per day! I was experiencing closer to 60,000/day. This will exceed the 50,000 transaction limit in 1-2 days.
To Disable Diagnostics: In the solution explorer, double click on the web role configuration file and uncheck both "Enable Diagnostics" and "Use publish Storage Account"
**Updated 2/2 to include disabling IntelliTrace
IntelliTrace And Profiling
After a few days of monitoring the account I was STILL getting tens of thousands of transactions each day. Another Azure support ticket discovered that this time I had enabled IntelliTrace without realizing it. When you publish make sure you disable both IntelliTrace and Profiling.
Debugging a Published Hosted Service with IntelliTrace and Visual Studio
Now I am being billed for a few hundred transactions each day instead a 100,000. Storage transactions are cheap, but it will cause a free trail account to get suspend in just a few days.
- Make sure you have a valid robots.txt file for your site.
- Disable Diagnostics – enabled by default
- Disable Intellitrace – Visual Studio Ultimate Version only
- Disable Profiling
Hopefully, this will help you get the most out of the Windows Azure Free Account.