Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

AppWebServices/AppGridWebService.ashx SQL timeout expired

Posted on by 75

I am having a problem with loading data from a CRM dashboard.  A user does a search on a grid, the results return quickly, however when they click on the next page the message "Loading records" is displayed, and then eventually a SQL timeout occurs.  On the crm server on the event logs the following message is shown:

RequestUrl: https://**REMOVEDURL*/AppWebServices/AppGridWebService.ashx?operation=Refresh, StackTrace: [CrmException: 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.Platform.Grid.GridDataProviderBase.PrepareGridData()
at Microsoft.Crm.Application.Platform.Grid.GridDataProviderBase.PrepareData()
at Microsoft.Crm.Application.Controls.GridUIProvider.Render(HtmlTextWriter output)
at Microsoft.Crm.Core.Application.WebServices.AppGridWebServiceHandler.GetRefreshResponseHtml(IGridUIProvider uiProvider, StringBuilder sbTemp)
at Microsoft.Crm.Core.Application.WebServices.AppGridWebServiceHandler.Refresh(String gridXml, StringBuilder sbXml, StringBuilder sbHtml, Boolean returnJsonData)
at Microsoft.Crm.Core.Application.WebServices.AppGridWebServiceHandler.ProcessRequestInternal(HttpContext context)

[XmlException: Microsoft.Crm.CrmException: SQL timeout expired.


Other searches and queries within CRM are quick (pagination also works), it is only on the dashboard grid.  I have also pasted the SQL query (discovered from the event log) in to SQL server and that runs quickly also. 

Any suggestions?

 

 

*This post is locked for comments

  • Vlad Ichim Profile Picture
    Vlad Ichim on at
    RE: AppWebServices/AppGridWebService.ashx SQL timeout expired

    I have a similar problem at the moment. It is in hand with Microsoft but for me it happens on the Case Form and it happens because it tries to do the Recent Cases view on the form. I had this problem since I've updated to the latest CRM Cumulative update 8.2.2.0112 (on-premise server).

    The way I solved this temporarely until I receive a more formal response, I've removed the Recent Cases subgrid from the form. In my case the Case Form doesn't actually have that subgrid. Recent Cases subgrid resides in the Accounts entity under Forms > in the Quick View Form called "account card". I just removed the subgrid from there, save and publish.

    See if this solves your problem in any way. If you find how to solve this SQL Timeout error in the first place, please reply the answer for the community as well.

    Thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans