Caldavd vs DirectoryService

July 2, 2009

Has your OD master began to run really slow, with DirectoryService taking over 100% of your CPU? Running iCal server on the same machine? Deleted any accounts recently?

Then you might be bitten by the same bug I finally figured out, thanks to the AFP548 forum.

When you delete a user, the delegates are not deleted, which, depending on the number of delegates you have (we have quite a few as all group members are set as RW delegates for the group account in addition to personal delegations), puts a tremendous burden on DirectoryService as caldavd pounds it with questions it doesn’t know how to answer, ala:

2009-06-05 14:49:09+0300 [-] [caldav-8010]  [-] u'No principal found for UID: 0681EE7A-8DE9-4070-B32D-2E1D971EE640'
2009-06-05 14:49:09+0300 [-] [caldav-8010]  [OpenDirectoryService] Unable to find any record with GUID EE2223F2-1077-49FE-A76C-BB90F4B47E8E
2009-06-05 14:49:09+0300 [-] [caldav-8010]  [OpenDirectoryService] Unable to find any record with GUID EE2223F2-1077-49FE-A76C-BB90F4B47E8E
2009-06-05 14:49:09+0300 [-] [caldav-8010]  [OpenDirectoryService] Unable to find any record with GUID EE2223F2-1077-49FE-A76C-BB90F4B47E8E
2009-06-05 14:49:09+0300 [-] [caldav-8010]  [OpenDirectoryService] Unable to find any record with GUID EE2223F2-1077-49FE-A76C-BB90F4B47E8E

In the same thread there is a link to a tool that deletes the orphaned principals, but a word of warning: it completely hosed my group delegates (ie you configure a group account using it’s URL and then delegate all the members so that they only have to check the group in iCal). Personal delegations were left intact.

The good news is that the server is working fine again. Many thanks to Mr. Jack Miller for finding the solution!