Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Workflows stuck in "Waiting" and "Waiting for Resources" in Dynamics CRM 2016

Posted on by 60

Hi Folks, 

We are getting the following exceptions in the Workflows with Status "Waiting" and "Waiting for Resources" in Dynamics CRM 2016 (on-Premise) and When we are restarting the CRM Asynchronous Service or Resume the Workflow, then workflow getting succeeded.

  • System.Data.SqlClient.SqlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support:
  • WorkflowDataAccess: Unexpected number of records selected. Expected: 1, actual: 0. Query: System.Data.SqlClient.SqlCommand.
  • The requested record was not found or you do not have sufficient permissions to view it.

Please let us know the possible solutions to fix this issues?

Thanks

Jasdeep

  • JasonMcneil Profile Picture
    JasonMcneil 215 on at
    RE: Workflows stuck in "Waiting" and "Waiting for Resources" in Dynamics CRM 2016

    Hi Jasdeep,

    Did you ever have any further luck with this? We're experiencing the same issues/behaviour, with the exact same error about pending transactions.

  • Jasdeep Singh Profile Picture
    Jasdeep Singh 60 on at
    RE: Workflows stuck in "Waiting" and "Waiting for Resources" in Dynamics CRM 2016

    Now, I verified the Logs and found the number of error logs with the following exception that causing from the Workflow with waiting status:

    "The transaction operation cannot be performed because there are pending requests working on this transaction"

    I would appreciate if someone can help.

    Thank you!

  • Suggested answer
    Jasdeep Singh Profile Picture
    Jasdeep Singh 60 on at
    RE: Workflows stuck in "Waiting" and "Waiting for Resources" in Dynamics CRM 2016

    Hi Temmy,

    We also did the same, after restarting the Async service, it worked fine for some time and then again workflow getting stuck for long time.

    Now we have updated the settings in "DeploymentProperties" table" in "MSCRM_Config" database and monitoring the Workflow jobs and will keep you posted. Hopefully it should work.

    Please refer this URL - www.cnblogs.com/.../6701546.html

  • Jasdeep Singh Profile Picture
    Jasdeep Singh 60 on at
    RE: Workflows stuck in "Waiting" and "Waiting for Resources" in Dynamics CRM 2016

    Thanks Nishant Rana!

    I verified the same configuration in SQL, that was fine.

  • Suggested answer
    Temmy Wahyu Raharjo Profile Picture
    Temmy Wahyu Raharjo 2,914 on at
    RE: Workflows stuck in "Waiting" and "Waiting for Resources" in Dynamics CRM 2016

    Hi Jasdeep,

    For this problems, what I will do:

    1) Check database lock. If got any, try to clear it.

    2) Always monitoring the status of the workflow especially if you get a lot of the workflow stuck. Try to clear up the workflow (depend on the priority of your workflow, if not important, delete it).

    3) Restart the async service.

    Just last week I also encounter the same problem. Suddenly there's a lot of stuck workflow with weird name on it (like system workflow). What my teammate do is clear the stuck one, and suddenly the system back to normal.

  • Suggested answer
    Nishant Rana Profile Picture
    Nishant Rana 55 Microsoft Employee on at
    RE: Workflows stuck in "Waiting" and "Waiting for Resources" in Dynamics CRM 2016

    There is one suggestion in the last response there

    Open SQL Server Management Studio, right click on the SQL Server at the top of the Object Explorer tree and select Properties.  In the Server Properties dialog box select the Connections option on the left then scroll down the list of Default connection options until you get to the one "no count", if this is checked please un-check it.  Click OK then restart the SQL Server instance.

    community.dynamics.com/.../98405

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans