Buradasın
SQLClient Execution Timeout Issue
github.com/dotnet/SqlClient/issues/647Yapay zekadan makale özeti
- Problem Description
- Error 258 occurs when executing SQL queries in Docker containers
- Issue affects only some queries, not all
- Error appears randomly, not consistently
- Command timeout is set to 3 seconds
- Investigation Results
- Issue occurs with both Microsoft.Data.SqlClient 1.1.3 and .NET Core 3.1
- Problem appears in both Windows and Linux environments
- Issue affects both Dapper and EntityFramework applications
- Problem occurs with both single-parameter and table-valued queries
- Root Cause
- Issue appears to be related to TCP buffer usage
- Large SQL queries may get stuck in partial ACK loops
- Problem occurs when connection or thread pool is overloaded
- Issue persists even after disabling MARS
- Workarounds
- Adding using blocks around SqlCommands helps
- Limiting packet size in connection string resolves the issue
- Moving work to dedicated processes helps
- Reducing parallel work or adjusting thread execution doesn't fix the problem