Tuesday 22 November 2011

MS Dynamics CRM 4.0 Deletion Service is not running

We finally implemented a new windows service that deletes calendars, I have talked about the joys of trying to delete calendars before. At any rate, the problem we now have is that the Deletion Service has not run to completion since the calendars were deleted, we get a time out error:
Exception while trying to execute AsyncOperationId: {GUID} AsyncOperationType: 14 - System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
where GUID matches the ID of one of the entries in the scalegrouporganizationmaintenancejobs table.

After running a few sql queries we found that we have over 1 million records marked for deletion, i.e. deletionstatecode=2, across various tables, I'm not sure how long this has been failing for, but it looks like it has been failing for a while, something to investigate for sure. After doing a bit of reading I found this post that recommends this KB.

The KB in essence suggests creating two registry DWORD keys:
  • OLEDBTimeout
  • ExtendedTimeout
OLEDBTimeout needs to be set to 86400
ExtendedTimeout to 1000000 and no larger than 2147483647

In our case we have multiple application servers, but it seems that the error regularly occurs in one of the servers only, so we have made the registry changes on that one server only and we are waiting for it to run tonight.

Let's see if this does the trick.

2 comments:

  1. Did the change solve your problem?

    ReplyDelete
  2. It did. If memory serves me right it took a good 10 minutes to complete.

    We are currently running with an OLEDBTimeout of 3 minutes, which is more than enough for our needs.

    ReplyDelete