web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Query execution time of "" seconds exceeded the threshold of ""seconds

(0) ShareShare
ReportReport
Posted on by

We run into a lot of problems due to long queries. Performance is low and workflows stay in waiting status.
Anyone who can help me out???

The situation:
Custom workflow step updates 1 field in contact entity. Workflow is now triggered "On Demand"
and performs simple query
3821.Capture2.PNG

About 20% of the workflows stay in waiting status due to too long query time (up to 122 sec).

The generated query in event log:

0726.Capture3.PNG

Executionplan and statistics:

1263.Capture4.PNG

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Small addition: I call the WF for 100 contacts at the same time

  • Nuno Profile Picture
    2,005 on at

    Hi,

    If your custom workflow updates 1 field in contact entity, why are you retrieving eight attributes of contact?

  • Community Member Profile Picture
    on at

    Because the updated field is based on these.

  • Community Member Profile Picture
    on at

    Found this error in eventlog (backend server)

    Host JobId: 4aaca4e9-ec68-e411-a177-02bf0a010ad5 OrgId:d5feef73-de44-e411-8b4d-00155d015c00 JobType:10; ErrorMessage:Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An unexpected error occurred.Detail:

    <OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance&quot; xmlns="schemas.microsoft.com/.../Contracts&quot;>

     <ErrorCode>-2147220970</ErrorCode>

     <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic&quot; />

     <Message>An unexpected error occurred.</Message>

     <Timestamp>2014-11-10T15:20:50.1998338Z</Timestamp>

     <InnerFault>

       <ErrorCode>-2147220970</ErrorCode>

       <ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic&quot; />

       <Message>System.InvalidOperationException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #464F1301</Message>

       <Timestamp>2014-11-10T15:20:50.1998338Z</Timestamp>

       <InnerFault i:nil="true" />

       <TraceText i:nil="true" />

     </InnerFault>

     <TraceText i:nil="true" />

    </OrganizationServiceFault>

      at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.RetrieveMultiple(QueryBase query, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)

      at Microsoft.Crm.Extensibility.InprocessServiceProxy.RetrieveMultipleCore(QueryBase query)

      at Microsoft.Crm.Workflow.WorkflowContextBase.get_EntityDependencies()

      at Microsoft.Crm.Workflow.WorkflowContextBase.RetrieveEntityInstances()

      at Microsoft.Crm.Workflow.ActivityHost.StartWorkflowExecution(Activity workflow, ICommonWorkflowContext context)

      at Microsoft.Crm.Workflow.ActivityHostBase.StartWorkflow(ICommonWorkflowContext context, Activity preLoadedActivity)

    ErrorCode:-2147220970 ResultCode:10 Machine S10215: A Microsoft Dynamics CRM Asynchronous Processing Service operation of type %2 has failed

    Organization ID: %3

    Organization Unique Name: %4

    Error code: %5

    Error description: %6

    Think it's related...

  • Community Member Profile Picture
    on at

    Hi Robin,

    Have you been able to solve the error you have posted?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans