In Our Application while executing one of the LINQ Query we are getting error.
Type: System.Data.SqlClient.SqlException
Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Source: .Net SqlClient Data Provider
HelpLink.ProdName: Microsoft SQL Server
HelpLink.ProdVer: 10.00.5829
HelpLink.EvtSrc: MSSQLServer
HelpLink.EvtID: -2
HelpLink.BaseHelpUrl:http://go.microsoft.com/fwlink
HelpLink.LinkId: 20476
Understanding in detailed we found it is due toExchange Spill.
This looks like an optimizer time-out as SQL Server is not able to create an execution plan for the LINQ query.
When the LINQ query is converted to normal query it runs in seconds.
We have a bunch of similar issues in our environment.
Below is the SQL Server profiler output. Please help!
Do we have a fix for the issue or is there a workaround available for this issue.
Appreciate any help on this issue.