I have a request that, when executed from my application, throws
[SqlException (0x80131904): timed out. The timeout period expires before the operation completes or the server does not respond.]
I get the same error when navigating through code in Visual Studio.
But when executing the code in SQL Server Management studio using the same credentials, the query is returned instantly (in this case, the rows are not returned).
The query is generated by the Entity framework - I tested SSMS by extracting sql from IQueryable and inserting it into the query window. A timeout error occurs when the code falls into "ToList ()".
SQL Server runs in an Azure guest virtual machine.
In some contexts, I have seen similar behavior once before, but the latter case was a complex (and rather complex) stored procedure. Sometimes sp gets into a state where it will only be time from VS or .NET, but it will work fine with SSMS. A fix would be to crash and recreate the SP.
This current request is simple by comparison, but I don’t know how to “clear” it, as I did with sp, since it is generated on the client.
Does anyone know what can lead to a timeout for a specific request, but only from some clients?
.NET 4.5., EF 6.0.
- 30 ( ). , - , , , . , 2 EXISTS where .