Recently I was working on an issue and found the worker role was keep recycling. After I logged into Azure VM and looked as Application Event Log, I found the following exception was logged every 30 seconds:
Log Name: Application
Source: .NET Runtime
Date: 7/6/2011 9:39:28 PM
Event ID: 1026
Task Category: None
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Data.SqlClient.SqlException
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, Boolean)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String, System.Data.Common.DbAsyncResult)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(System.Data.Common.DbAsyncResult, System.String, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
Investigation and Solution:
After Investigation, what we found is that SQL Azure database was set to a max size of 1GB, and that database was full. Some of the worker roles were attempting to write trace data to the SQL Azure DB on startup, and since the database wasn’t accepting new data, the roles terminated unexpectedly. After making room in SQL Azure DB the problem was resolved.