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:
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:
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.
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.
Then created an advanced find view to search for ‘in progress’ or ‘waiting for resource’ workflow jobs.
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.
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.
We would also like to offer our services if you are sick and tired of dealing with this. We host Dynamics CRM / XRM applications for many other partners and companies. We have put together a series of packages that we have found fit the needs of most groups – you can see information on the program here PowerISV for Dynamics CRM
If this helps you, please let us know!!!