You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

CalendarAgent process is out of control - delegation may be causing problems?

I use GMail/GCal for email and calendar. I had my GCal synced to iCal in Snow Leopard, but stopped using it in Lion. After upgrading to Mountain Lion I decided to give it a shot again, mostly to get my appointments in the notification center. However, I noticed that a process called "CalendarAgent" was using tons of CPU and memory: over 100% and 400 mb, respectively. It was slowing my computer down and killing my battery life.


After some investigation, it seems like Delegation (calendars that are shared to me by other GCal users) may be part of the problem. If I remove all of the calendars from the "Delegation" tab in the Preferences for Calendar, then CalendarAgent goes down to 0-1 % CPU and 156mb memory. It still seems a little high on the memory front, but at least the CPU isn't out of control now.


This is obviously not an optimal solution. I need to access the shared calendars to schedule meetings with my coworkers. Has anybody run into this issue? Any ideas for fixing this? Is it a Mountain Lion bug?

MacBook Pro (15-inch Mid 2010), OS X Mountain Lion

Posted on Jul 29, 2012 10:24 AM

Reply
82 replies

Oct 24, 2012 4:13 AM in response to Ola_M

Thanks! I tried Ola_M's procedure "How To Stop CalendarAgent From Eating CPU", and it worked very well. Now things calmed down.

I was having the same extreme use of cpu by CalendarAgent, and I don't have ANY calendars except iCal, so it's got nothing to do with Google (in my case).

But I do have calendars WAY BACK. I didn't quite understand, how do I get rid of those old calendars?

Jan 1, 2013 10:40 AM in response to msl422004

I've had memory leaks caused by Calendar Agent. Tried the fix above, pasted below for convenience. Calendar is using 188MB of memory and Calendar Agent 198MB. 0% CPU for both. Memory use is down 50-150 MB from before teh fix, but it still seems like a lot. I have notifications turned off, but I still get them.


How To Stop CalendarAgent From Eating CPU

Posted on 8/19/2012

Recently ran into an issue with Calendar causing a huge CPU spike. Checking the system.log I noticed the following repeatedly in my log:

CalendarAgent is essentially Calendar’s backend (that’s how it’s also able to power the notification center). The best resolution I’ve found is to completely clear out the calendar and recreate it. Process I used was as follows:


  1. Remove the Calendar from “Mail, Contacts & Calendars” pref panel (just uncheck from the account). Then go into Calendar and make sure the account is removed. If it’s not, remove it.
  2. Delete ~/Library/Calendars/
  3. Delete ~/Library/Preferences/com.apple.iCal.plist
  4. Go back into the “Mail, Contacts & Calendars” pref panel, put the calendar back. Give it some time to download.

Jan 6, 2013 6:08 PM in response to Marv Richardson

UPDATE: My iCal had automatically (re)set up an iCloud subscription to Birthdays (I'm sure I had set this up previously using this approach (http://support.apple.com/kb/PH2676)).


I unchecked the Birthday subscription from iCal's left pane (Calendars). I killed the CalendarAgent process using Activity Monitor. It restarts automatically. After an hour, it had grown to only 391MB and used only 1 minute of CPU.


1330 CalendarAgentmarvinrichardson0.05391.8 MBIntel (64 bit)1:09.76


I have a 4 core system, so if I understand the way CPU time is reported, this is only 1/240th of that hour's capacity (240 CPU-Minutes = 4 cores x 60 minutes).


Still seems crazy to use that much real memory. By comparison that's more than Firefox and Mail combined are using currently with similar light activity and short run times. But, I'm fortunate to have lots of capacity ...

Jan 21, 2013 10:57 AM in response to Bittsel

Well throwing out iCal isn't really the fix that we wanted, is it? I tried the fixes and everything calmed down ... for a while (actually a few days!). BUT now we are back!

But one good thing: I was contacted by Apple, who asked me to upload some data to them, and they would get someone to look at it 🙂 . So hopefully in the future there will be a solution to the problem ... I hope!

In the meantime I will continue to "strangle" CalendarAgent via Activity Monitor. It's a drag, but hopefully it's worth waiting for.

Jan 23, 2013 1:06 AM in response to Bittsel

It is strange that Apple ignores this serious problem for many. I can only again recommend what solved it for me; - copy all entries you need into a new calendar and delete the old one. At one point I got a new couple of "dummy" entries in a minor calendar I had not done this with, which were easy to delete. In the new calendar no dummy entries have appeared after several omnts of use and syncing across devices. Regards

Jan 23, 2013 1:34 AM in response to Ola_M

I'm sure Apple isn't ignoring the problem. Many months ago, I was contacted and asked to supply some diagnostic data after reporting this issue, so it seems it has been looked at.


For me, the problem went away. I don't really know why I'm afraid. It might have been an OSX update or it could have been my removal of some older calendar entries and cleaning up. All I can say is thst I've not seen the problem for months and CalendarAgent on my old MBP is currently 31MB according to ActivityMonitor - and that's after running for 20 days.

Jan 23, 2013 9:25 AM in response to msl422004

All,

There is no solution to this. I've been playing around with this in every way imaginable and it always comes back. Others have found their own work around or a temporary solution, but nothing permanent. Until Apple comes out with a permanent fix, everything you're reading are just workarounds.



That said, here's my personal workaround:

  1. I have two calendars, one Google (which does have delegates) and one is my work email via Exchange.
  2. I have turned off the notifications and unchecked any delegates for the Google calendar and Exchange Calendar.
  3. Issue still occurred.
  4. I deleted both calendars and cleared the cache
  5. Issue goes away, obviously.
  6. I experimented with only adding one calendar, and when I just add my Google calendar (and remove items listed in #2), issue still occurs. However when I just add my work calendar (and remove items listed in #2), I don't get an out of control CalendarAgent.


No software, or coding, or scripts needed. ***** I can't have my Google calendar on my Mac, but I sync it with my work calendar so I didn't really need it anyway.


Now I'm just worried about all the damage the heat and high processing has done to my battery and processor. 😢

Jan 23, 2013 11:33 AM in response to Bittsel


I got this problem after clean install of ML. By accident I found I had 25 000 iCal events called "dummy", all on Jan 1st 1970. After trying to delete them in iCal, with truckloads of spinning beach balls and dozens of Forced quits, I had a look inside the ics file, and this is how they look:


BEGIN:VEVENT

CREATED:20120824T174009Z

UID:E67E4327-8746-4079-9D9E-31FA4DC71A16

DTEND;TZID=Europe/Oslo:19700101T020000

TRANSP:OPAQUE

SUMMARY:dummy

DTSTART;TZID=Europe/Oslo:19700101T010000

DTSTAMP:20120824T174009Z

SEQUENCE:1

BEGIN:VALARM

X-WR-ALARMUID:92778ECD-7357-42EC-9479-90A207D563E2

UID:92778ECD-7357-42EC-9479-90A207D563E2

TRIGGER:-PT5M

X-APPLE-DEFAULT-ALARM:TRUE

ATTACH;VALUE=URI:Basso

ACTION:AUDIO

END:VALARM

END:VEVENT


In my case it appears from the date stamps that all (most of) these events were created on20120824, which was around the time I upgraded to ML.


I tried to find a way to search and replace, but gave up. In the end I just copied all events from this and next year to a new calendar en deleted the old one. It shrank from 19 Mb to 585 kb. Now it syncs fine again.


I checked again, and found two of the same dummies generated since my fix (about one month ago). So the problem is persistent although not dramatic. Regards

CalendarAgent process is out of control - delegation may be causing problems?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.