CRM 4 – Battling High Async CPU Usage
Once again we have been battling Microsoft CRM 4.0 and high CPU usage on the asynchronous process. This time it appear to have risen out of nowhere. Our quad core server went from 5% CPU usage all of the sudden to 100% CPU usage and workflows began taking 20 mins, then 30 mins, then not executing at all.
After a lot of debugging and many more gray hairs, we have found the cause….or in this case a bug caused by poorly designed workflows.
The issue is related to workflows that fire on deletion of a record AND try to check an attribute on the record. For example, this simple, yet poorly written workflow can cause havok.
Running this bad workflow on on lets say 3 contacts can cause a server to go from this:
Run this bad workflow on 3 more contacts and we have this:
You can now image what happens if we were to delete 20 or 30 contacts thus causing this workflow to run 20 or 30 times. Havok and unhappy customers.
This is a bug and Microsoft is working on a hotfix. However, when researching this we did not find any info on newsgroups or blogs.
Let us know your thoughts.