# Microsoft.EntityFrameworkCore.Storage.RetryLimitExceededException: The execution strategy 'SqlServerRetryingExecutionStrategy' executed the operation 6 time(s) without success.

- **ID:** `dotnet/ef-core-connection-resiliency-failed-to-retry`
- **Domain:** dotnet
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Entity Framework Core's retry execution strategy exhausted its retry attempts due to persistent transient faults like deadlocks, timeouts, or network blips from SQL Server.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Entity Framework Core 6.0.x | active | — | — |
| Entity Framework Core 7.0.x | active | — | — |
| Entity Framework Core 8.0.x | active | — | — |

## Workarounds

1. **Analyze SQL Server error logs for deadlocks or timeouts; optimize queries or indexes to reduce contention.** (75% success)
   ```
   Analyze SQL Server error logs for deadlocks or timeouts; optimize queries or indexes to reduce contention.
   ```
2. **Reduce retry interval and increase max retry count with exponential backoff in DbContext options.** (85% success)
   ```
   Reduce retry interval and increase max retry count with exponential backoff in DbContext options.
   ```
3. **Implement custom execution strategy to log and handle specific transient exceptions like deadlock (1205).** (70% success)
   ```
   Implement custom execution strategy to log and handle specific transient exceptions like deadlock (1205).
   ```

## Dead Ends

- **** — Increasing retry count without addressing root cause just delays failure. (90% fail)
- **** — Disabling retry entirely makes app brittle to transient faults. (95% fail)
- **** — Switching to a different execution strategy doesn't fix underlying database issues. (80% fail)
