Quantcast
Channel: entityframework Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1793

New Post: SqlAzureExecutionStrategy not retrying on "Timeout expired" errors

$
0
0
@just_dmitry

The SqlException with error code -2 (Timeout) is not retried on by default. We believe that this type of exceptions is NOT something we should encourage the developers to always compensate by a retry. Timeouts may have a very distinct nature and can be the result of poor model design, lack of indexes, suboptimal query plans, blockings, timeout settings misconfiguration, and more. It is unwise to always retry when you get a timeout. Therefore, we have decided not to include the general timeout errors into the framework.

Instead, I would recommend looking into when this exception is thrown if it's always during a particular operation or an operation on a particular table then modifying might give better results. If however you see the exception thrown at random places and you are confident that changing your code doesn't prevent it then you can add it to the list of retriable exceptions by deriving from SqlAzureExecutionStrategy and overriding ShouldRetryOn.

Thanks,
Andriy

Viewing all articles
Browse latest Browse all 1793

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>