Full exception:
System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for de
Physical connection is not usable
is a big category of errors, some of them are transient, but some aren't. SqlAzureExecutionStrategy
only retries specific errors that are known to be transient.
You should examine all codes contained in .Errors
collection to determine whether the action should be retried. Please report if you find specific recurring transient errors that SqlAzureExecutionStrategy
misses.
That said, generic errors -1 and -2 can be retried in your custom strategy once you ruled out all possible causes under your control: long running transactions, excessively complex queries, too many concurrently opened connections.