Reputation: 1352
I have a worker role that connects to Sql Azure retrieves a record at a time, processes it marks it done using Entity Framework 4. Pseudo code
while (true)
{
ProcessRecord();
}
ProcessRecord()
{
try{
ObjectContext oc = new ObjectContext ();
//process records
oc.Dispose()
}
catch(Exception e)
{
//logging code goes here...
}
}
The role runs just fine but occasionally (say 9 hrs once) I get an error - "The underlying provider failed on Open." Does that mean that the worker role is unable to connect to SQL Server?
Upvotes: 1
Views: 607
Reputation: 170519
That's some random environment-related error as described here. That happens - SQL Azure is on a separate machine and sometimes network requests just fail. You have to retry your request, that's it.
Upvotes: 1
Reputation: 30903
Do you log the exact error code? In general there are a lot of things that could be. As a start I suggest to read this article, explaining a lot of them. Also check out this SO question, as my answer there explains a lot about Windows Azure SQL Database.
Upvotes: 2