2
votes

I have an on-premise instance of MS CRM 2011. Many advanced finds have just hit the point of "SQL Server timeout expired." They aren't crazy ones either. CRM Trace doesn't give me much info beyond the same thing as the event viewer (shown at the bottom of this post). I have tried SQL traces using the directions here and here, but there is simply too much going on in SQL to decipher it. Any ideas what exactly I should be looking for?

I have been tweaking performance on this for years, so I have already tried a lot of the common tricks (OLEDBTimeout/ExtendedTimeout, adding indexes, etc.)

Error:

Exception information: Exception type: CrmException Exception message: SQL timeout expired. at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal() at Microsoft.Crm.Application.Platform.ServiceCommands.RetrieveMultipleCommand.Execute() at Microsoft.Crm.ApplicationQuery.RetrieveMultipleCommand.RetrieveData() at Microsoft.Crm.ApplicationQuery.ExecuteQuery() at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.GetData(QueryBuilder queryBuilder) at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.LoadQueryData() at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.LoadData() at Microsoft.Crm.Application.Controls.GridUIProvider.PrepareGridData() at Microsoft.Crm.Application.Controls.GridUIProvider.Render(HtmlTextWriter output)

... abridged ...

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Request information: Request URL: url/org/AdvancedFind/fetchData.aspx?EntityCode=10210&QueryId={029DE247-EE5F-4FF9-B2E2-2730CFB17B0F}&ViewType=1039&pagemode=iframe&sitemappath=sales|Customers234|contact Request path: /org/AdvancedFind/fetchData.aspx User host address: 1.2.3.4 User: domain\username Is authenticated: True Authentication Type: Negotiate Thread account name: domain\SQL_ADMIN

1
What entity are you querying when the timeout occurs? In some databases I've seen Quick search timeout when 'test' is entered just due to the volume of the results.user2295317
In the most recent, it was Phone Call, but also with custom entities as well. The results aren't a huge set either; less than 100 records.user1231257

1 Answers

0
votes

Use SQL Server's profiler tool to find out what query is causing the timeouts. The database itself could very well be the source of the problem.

Did you have had maintanance on the DB (reindexing, partitioning etc.)?