Intermittently hitting the peak resources in Azure SQL server. Any Suggestions?

From Punit Ganshani @ganshani via Twitter

Intermittently hitting the peak resources in Azure SQL Server (with S0 performance level i.e. 10 DTU)... Any suggestions? Using EF. EF Context objects are disposed immediately and DB writes through multiple processes.. what's the fix? 

https://twitter.com/ganshani/status/642758193613967360

Thanks,
@AzureSupport

September 12th, 2015 2:03pm

A few thoughts:

  1. Are you certain that S0 is appropriately sized for your needs? S0 isn't a terribly powerful performance level.
  2. Any chance you just have a poorly-tuned query? Indexes, statistics, and more can help if the structure of the query isn't bad.
  3. Any chance your data isn't normalized properly? One tip to help identify improper normalization is when you use "DISTINCT", "EXISTS" or anything else like that in some of your queries. (This isn't a guarantee but this tends to warrant additional investigation.)
Free Windows Admin Tool Kit Click here and download it now
September 12th, 2015 3:18pm

I did increase the DTU to S2 and tried to find the logged in user instances.

I found multiple logins with same login_name which is expected, but more than 141 sessions were sleeping

running 9
sleeping 141

Is there any way to utilize these 141 sessions?  or any change required in connection string to auto kill them?

Server=tcp:azureserver.database.windows.net,1433;Database=dbname;User ID=user@azureserver;Password=pwduser;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;Max Pool Size=50;Application Name=MyAppName;

I am using plain vanilla EF Code First where the context object is disposed immediately after use.

September 13th, 2015 5:05am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics