CRM 4.0 - The Microsoft CRM Asynchronous Processing Service service terminated unexpectedly

Written on February 8, 2008 – 12:03 pm | by alexf |

Updated April 16, 2008. 

I’ll be writing a series of articles regarding the various issues that we have encountered while installing CRM 4.0 and migration CRM 3.0 to 4.0.   We have found solutions and fixes for all of these.  Hopefuly these articles will save you some time or tickets with Microsoft. 

Article one - the dreaded “The Microsoft CRM Asynchronous Processing Service service terminated unexpectedly”  service crashes.   

After finaly installing CRM 4.0 and upgrading your organization, everything appears to be running OK.  However, a small crm service called MSCRMAsyncService keeps crashing.  The quick fix is to set the service to automatically restart after a crash and do this perpetually:

services.jpg

However, this is not a good fix as it will lead to a small memory lead that will eventually cause CRM to completely stop responding.  This will also make your system log not very usable as it will be filled with service crashes and restart:
systemlog1.jpg

So what is the fix? 

Here are the 3 action items should fix this if the issue is related to workflows being ’stuck’ or not running properly. 

Action A.  Set the  MSCRMAsyncService to run as ‘local system’ instead of ‘network service’ account.
localsystem.jpg

Action B.  The MSCRMAsyncService is processing a workflow and for some reason it is crashing.  These workflows are probably old, stuck, and perhaps missing some type of required resource.  To identify these workflows, use the System Jobs in the Settings area.
systemjobs.jpg

Then created an advanced find view to search for ‘in progress’ or ‘waiting for resource’ workflow jobs.
advanced-find-inprogress.jpg

Examine the actual workflow to see why they are not running properly.  First,  fix or stop the actual workflow that is not running properly.  Then go back to this advanced find, and ‘cancel’ any in progress and ‘waiting for resources’ workflow that has been in this status for a while.
cancel.jpg

Depending on the number of running/stuck workflows that are being cancelled, this may take a while.

This alone may solve this issue.  If it does not, then proceed to plan B.

Action C.  So after having this blog post for a few weeks I received an email from Microsoft Support stating that Action C can cause major damage.  Action C used to suggest to a full sql backup on the config database and the organization(s) database then delete dbo.WorkflowWaitSubscriptionBase, dbo.WorkflowLogBase, dbo.DuplicateRecordBase, and dbo.AsyncOperationBase.  Do not do this as it could have side effects including stopping out of the box jobs such as duplicate detection jobs, contract state jobs, and full text catalog jobs.

 Instead take a look at KB949844 and KB950680.  These are two hotfixes related to the CRM Asynchronous job.

 If this helps you, please let us know!!!

Related Posts

Put your related posts code here
  1. 10 Responses to “CRM 4.0 - The Microsoft CRM Asynchronous Processing Service service terminated unexpectedly”

  2. By Ayaz Ahmad on Feb 9, 2008 | Reply

    Nice article and thanks for sharing the fix options.

  3. By Jeff on Feb 29, 2008 | Reply

    I have upgraded 3.0 to 4.0 and nothing is being delete from the DB. One example, incident.deletionstatecode is set to ‘2′ for 3 days now and there are no eror in the event log. I have re-started the Crm Async. Process. Any ideas?

  4. By alexf on Mar 1, 2008 | Reply

    Try to run the async service as local system account instead of the network service account.

    Alex

  5. By Jeff on Mar 4, 2008 | Reply

    Thanks for the idea but it made it worse. Work Flow stop working. After re-install 4.0 to reset to network service Work Flow still does not work. I will try to rebuild tonight.

  6. By alexf on Mar 5, 2008 | Reply

    Check to see if any workflows are ‘hung’. Is the workflow service keeps constantly crashing - clean out these tables:
    DELETE FROM dbo.WorkflowWaitSubscriptionBase
    DELETE FROM dbo.WorkflowLogBase
    DELETE FROM dbo.DuplicateRecordBase
    DELETE FROM dbo.AsyncOperationBase

    Alex

  7. By Manish on Mar 27, 2008 | Reply

    Nice post. In CRM 3.0 can i use following script to delete old stuck/failed Workflow, because in Workflow monitor status shows as “Running”

    DELETE FROM dbo.WorkflowWaitSubscriptionBase
    DELETE FROM dbo.WorkflowLogBase
    DELETE FROM dbo.DuplicateRecordBase
    DELETE FROM dbo.AsyncOperationBase”

    -Manish

  8. By Melanie Putnam on Apr 9, 2008 | Reply

    Guys (Gals if we are out there)… Be careful deleting the contents of the four db’s as I have been on phone with Microsoft for almost 9 hours after I did it. They suggested not doing it. I must give Kudo’s to the MS team though (especially Tami). I will update this site if we figure out what happened. Thanks

  9. By Tim on Apr 10, 2008 | Reply

    I am unable to delete from the AsyncOperationBase. When I try, I get the following:

    Msg 547, Level 16, State 0, Line 1
    The DELETE statement conflicted with the REFERENCE constraint “AsyncOperation_BulkDeleteOperation”. The conflict occurred in database “AmericanProfitRecovery_MSCRM”, table “dbo.BulkDeleteOperationBase”, column ‘AsyncOperationId’.
    The statement has been terminated.

    Any suggestions?

  10. By Tim on Apr 11, 2008 | Reply

    Nevermind, I resolved it.

  11. By Glen on Jun 2, 2008 | Reply

    Tim - Please tell us! What resolution method(s) did you use?

Post a Comment

Welcome

PowerObjects Microsoft CRM blog is place where PowerObjects CRM team will share its Microsoft CRM knowledge with rest of the world.More

Find entries :