Accident Prone (.com)

Entourage + SyncServices = Sleepless Nights

Posted On: June 5th, 2008 by tom

The equation is simple. From the google search results for the two terms "Entourage" and "Sync Services", you get the feeling I'm not alone in this. For those of you who have not suffered at the hands of Entourage, a brief explanation: Microsoft Entourage is a trimmed-down version of Outlook that runs natively on Mac OS X. And it stinks. But then again, so does Outlook (can anyone say, "bloatware"?).

Here's a review of the symptoms that led up to this morning's intervention:

  • My computer started to become very unresponsive
  • The poor CPU/system fans started running incessantly (I have a MacBook)
  • Activity Monitor showed a few processes going nuts:
    • Microsoft Sync Services
    • SyncServer
    • mds

There was a bit more to it, but that's the summary. Now, my MacBook is the backbone of my work. Everything I do, I do on that little puppy. It's a fantastic laptop. However, with these things bringing it to its knees, I simply couldn't get much done. Not to mention the fact that my battery would last a whopping 1 hour as compared to the original 4. Something had to be done.

So, I started taking things apart. Using Syncrospector, I pinned down that it was indeed the ical sync between entourage and iCal that was killing things. Address book was fine. I also took a look at the sync truth database (~/Library/Application Support/SyncServices/Local/data.syncdb). As per this wonderful post, I did a quick vacuum, bringing my 600M database down to 150M. Unfortunately, this did nothing to help.

Next step was to delete everything in the SyncServices/Local folder. Just remember, if you're trying the same thing, that you have to 'killall SyncServer' and exit iCal/Entourage/Address Book. Unfortunately, as soon as I kicked off SyncServer, things started going nuts again. Now we get into My Big Mistake (tm).

Thinking that the truth db might still be messed up somehow, I told Syncrospector to unregister Entourage 2008. Don't do this. Let me repeat: Don't do this!. The next time I tried to get Entourage to sync with anything, I got a nice little crash dialog, popping up every few seconds until I managed to tell it to knock it off. It took quite a while to figure out what went wrong. I had to run Microsoft's Sync Services daemon from the command line to get some readable output. Doing so finally let me know that the isync database schema had forgotten about "com.microsoft.entourage.notes.Note".

I shouldn't have found the forgetting part surprising... I had basically given SyncServer the concussion of a lifetime by deleting it's entire data store. So I spent the next twenty minutes trying to find the schema definition. I finally just created a new account on my MacBook, registered Entourage, and watched to see what changed, finally spotting the schema update under ~/Library/Sync Services/Schemas. A new bundle, called (surprisingly), "com.MicrosoftOfficeNotes.syncschema" was placed there. So the next logical step was to see how to get *my* account to accept this schema update.

I tried the obvious first- just dropping the bundle in the same location and recursively chown'ing the thing to my account. Of course, that didn't do anything for me. My next step is the first intelligent step- take a look at the Sync Services API for Cocoa. You can take a look here at the documentation, specifically the Creating a Sync Schema article. This finally led me to necessary function call for registering new schema, which I could use to register the missing schema bundle with Sync Services.

Now I really didn't feel like writing up a wrapper for a single call, but, again, if you are trying to follow this to repair your own system, you might want to. It's simpler to do so unless you happen to have ruby + rubycocoa already installed... Since I did, it was a fairly trivial script:

require 'osx/cocoa'
include OSX
ns_import :ISyncManager
ISyncManager.sharedManager.registerSchemaWithBundlePath("/Applications/Microsoft\ Office\ 2008/Office/Microsoft\ Sync\ Services.app/Contents/Resources/MicrosoftOfficeNotes.syncschema")

That was it. I fired up Entourage, kicked off Microsoft Sync Services, and I was back in business. Unfortunately, that meant I was back to dismal performance. So, I finally took a look at what in my calendar was giving SyncServices so much grief. Lo and behold, I had 3500 calendar events spread over the last 6 months. And 95% (literally) were duplicates. A half hour later, after sweating out deleting all dups by hand, I kicked off sync services again. Huzzah! It works! My iPhone now syncs in less than two minutes, (it was taking >20 min before), my iCal has my Entourage calendar events, and my battery life is almost back to normal!

If you've suffered the same, or need some help getting your Entourage back to it's (still sad) original state, feel free to drop me a comment. I'll do what I can to help.

Addendum

If you find that mds and SyncServer seem to spike at the same times, crack open your System Preferences, open "Spotlight", under the "Personal" heading, select the "Privacy" tab, and make sure you add:

  • ~/Library/Application Support/SyncServices

I honestly have no clue *why* spotlight would be trying to index SyncServer's logs and databases, but there you are.

Main Categories

Recent Posts

Links

From the Bookshelf

Books I'm Reading

Shelfari: Book reviews on your book blog

Books I've Read

Shelfari: Book reviews on your book blog