CRM developer/User once in a life faces the issue regarding Asynchronous Processes stuck in same status i.e. InPrgress/Waiting/Pausing/Canceling.You can see the system job status is not changing.
The main reason behind this issue –
- Many jobs are in waiting status.
- Asyncoperationbase table become full due to many succeeded/canceled jobs occupied space.
- Asynchronous processes settings are not proper.
- The asynchronous workflows are not configured properly.
The solution for this issue –
- Very first step is to restart the Microsoft Dynamics CRM Asynchronous Processing Service. This might work in many cases.
- Many Jobs are in waiting status->
you can update the job status to canceled and completed by creating console application or from database-
a. Create the console and use the script –
b. Using Database Query-
Note- You should create restore(Checkpoint) point first before working on database directly to rollback changes if needed.
You can use “where statusCode=10 –Waiting”.
- Asyncoperationbase table become full due to many succeeded/canceled jobs occupied space –
You need to cleanup the database by deleting the succeeded and canceled jobs-
Make sure that only the following Async operation types are deleted if the state code of the types is 3 and the status code of the types is 30 or 32:
- Workflow Expansion Task (1)
- Collect SQM data (9)
- PersistMatchCode (12)
- FullTextCatalogIndex (25)
- UpdateContractStates (27)
- Workflow (10)
If script took very long time then you should stop the script and rebuild the indexes for AsyncOperationBase as well as PrincipalObjectAccess tables. And run the script again.
- You can check if the values are optimal-
Also you can check the ‘AsyncSdkRootDomain’ setting from [MSCRM_CONFIG].[dbo].[DeploymentProperties]Recommended value of ‘AsyncSdkRootDomain’ should be same as ‘ADSdkRootDomain’. Or you can put server name as value.
- And Finally you can check your asynchronous work flow logic.
There are many possibilities the workflows are stuck due to internal logic.
You have to restart the Microsoft Dynamics CRM Asynchronous Processing Service after executing any above step.
Post a Comment