Mail essentially unusable after upgrade

After the upgrade to Catalina, mail has become essentially unusable (2013 Mac Pro). Symptoms include extremely slow switching among different mailboxes. Extremely slow opening of emails and loading of same. 12 different email accounts, 2 exchange and the rest google. One of the things that i noticed is that both accountsd and mail have VERY high CPU usage, both hovering above 300%.


What I have done to try to fix:


  1. Re-install Catalina
  2. Deleted all email accounts and recreated.
  3. Deleted Mail preferences / accounts preferences / related preferences
  4. Disabled contacts syncing
  5. Disabled calendar syncing


Nothing has fixed the issue. Mail usually ends up crashing inside of 24 hours. accountsd crashes about 50% of the time


A similar thing happened in the early Catalina Betas on my 2018 Mac Book Pro, but seemed fixed in the mid beta cycle.


Any ideas would be great!!

Posted on Oct 16, 2019 9:44 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 27, 2019 9:12 AM

I didn't have a "ghost keychain" as you described, BUT, in a keychain called local items, there appeared to be a lot of cruft. I deleted all of the items in that keychain (some were automatically re-created), quit mail and forced quit accountsd. So far, that seemed to have resolved the issue. While I am still seeing transient cpu spikes for both, they are not sustained.


I will see what happens later today.

Similar questions

24 replies
Question marked as Top-ranking reply

Oct 27, 2019 9:12 AM in response to buymymonkey

I didn't have a "ghost keychain" as you described, BUT, in a keychain called local items, there appeared to be a lot of cruft. I deleted all of the items in that keychain (some were automatically re-created), quit mail and forced quit accountsd. So far, that seemed to have resolved the issue. While I am still seeing transient cpu spikes for both, they are not sustained.


I will see what happens later today.

Oct 28, 2019 3:07 AM in response to sbchasin

I had/have the same problem. Removing all Exchange/Office365 accounts immediately solves the issue with accountsd taking way to much CPU.


Would be great if this could be tested/confirmed by more of you. I really prefer to use Mail.app over Outlook but until this issue is fixed - zero - choice is given. Mail.app is unusable when accountsd is not handling exhcange accounts.

Nov 5, 2019 5:02 AM in response to sbchasin

I have solved the Mail problem. I wrote up what I did, leveraging a "purge" command that I'd never heard of in Terminal. Basically for each Mail account (under Mac Settings -> Accounts), I disabled mail, calendar, contacts, reminders on every single account. Then I ran the "purge" command. Restarted in Safe Mode and ran Mail (this apparently does something). And restarted and re-checked everything and it's been perfect. Only side effect is that Time Machine decided to back everything up again.


Here's more details ->


https://buymymonkey.wordpress.com/2019/10/27/osx-catalina-cpu-spike-checking-mail-after-upgrade/

Oct 16, 2019 4:41 PM in response to sbchasin

The issue appears to occur whenever macOS is unable to reach an email server. I don't know for certain but I guess macOS tries to log into a mail server every now and then and if it for some reason cannot do so, it panics and its CPU usage skyrockets. For me, this is often caused by a brief interruption of my Wi-Fi network or even just when moving my laptop around from place to place.

Though I have even seen it occur in cases where I simply disable my Wi-Fi. It's like macOS can't accept the fact that it's not going to be able to reach the server 100% of the time. It's really ridiculous.


The only fix I found was to remove both my Microsoft Exchange Account and my Gmail account from Accounts in my system preferences. I saw on Reddit you can then go Mail settings and manually input the IMAP settings for any mail servers and the issue will be resolved. However, the downside is that any contacts or calendar events stored on those servers will not be synced to macOS. That is something to consider.


Let me know if you have any other ideas or workarounds.

Jan 18, 2020 10:27 PM in response to sbchasin

Until apple gets that fixed.... I've written a script to continuously kill a process by its name


#!/bin/bash
INTERVAL=1

usage() {
  echo "Usage: $0 [-n INTERVAL] process_name" 1>&2 
}

exit_abnormal() {
  usage
  exit 1
}

while getopts ":n:" options; do

	case "$options" in
		n)
			INTERVAL="$OPTARG"
		  	if ! [[ $INTERVAL =~ ^[0-9]+$ ]]; then
        		echo "Error: -${options} must be an integrer."
        		exit_abnormal
			elif [ $INTERVAL -eq "0" ]; then
				echo "Error: -${options} can't be 0."
				exit_abnormal
			fi
		  	;;
		:)
	    	echo "Error: -$OPTARG requires an argument."
	    	exit_abnormal
	    	;;
	    *)
	    	exit_abnormal
	    	;;
	esac
done

shift $((OPTIND-1))

while [ 1 ]
do
	[[ -z "$1" ]] && exit_abnormal
	PID=$(pgrep -x $1)
	DT=$(date '+%d/%m/%Y %H:%M:%S')
	if [ ! -z "$PID" ]
	then
		kill -9 $PID
		if [ $? -eq 0 ]
		then 
			echo "$DT - $PID $1 killed" 
		else
			echo "$DT - Error killing $PID $1"
		fi
	else
		echo "$DT - $1 not running"
	fi

		sleep $INTERVAL
done

exit 0

Oct 24, 2019 10:50 AM in response to sbchasin

I'm surprised that that didn't fix it. If you remove all of your Internet Accounts, there are no servers for the accountsd process to panic about being unable to reach.


That was how I resolved the issue.


Side note though: I also switched to using Outlook until the issue is fixed because one of my other email servers has two-factor authentication that is not compatible with manual input of mail settings.

Oct 30, 2019 8:35 PM in response to sbchasin

I haven't had the out of control CPU usage, but every day or two accountsd grows to more than 2GB which really puts a damper on the performance of everything—even with 16GB of RAM on a brand new 2019 MacBook.


I'd expect closing mail, calendar, and other apps that use internet accounts would allow it to recover on its own, but the only way to recover from the memory leak seems to be rebooting.


☹️

Oct 27, 2019 9:12 AM in response to buymymonkey

Thanks buymymonkey, but in my case, I don't have a ghost keychain. I have login, iCloud, System, System Roots, and they all have stuff in them.


Since my last post on Oct 19, my CPU has died down. That may just be for the time being, and it will start up again. But, I still practically can't search, or it takes forever and just displays "Searching..." Fetching new mail can take minutes. Just clicking on a different email or mailbox can take 10-30 seconds to view.

Oct 28, 2019 3:26 AM in response to A Bigger Bite

I still can’t search in mail. I’ve tried a number of suggestions in terminal and safe modes. I do it restart then it works then 30 min later I can’t search again. I reverted back to an old MacBook since mail is unusable and restarting my machine every 30 min is ridiculous. I wish I never updated my machine. It’s been a nightmare from mail to other apps. Almost as bad as the new os on my iPhone. Horrible

Oct 30, 2019 9:04 PM in response to DarthReed

I have a 2019 MacBook as well, and it's basically an iPad.. or very basic stuff.. apple wants everything in the cloud, but they only offer 2TB cloud space.. then many of these MacBooks barely come with enough hard drive space then you add new updated OS and anything else on your laptops eats up the rest of the space. so you basically are left with external hd / deleting stuff to make room all the time.. Its mind blowing how hard they make everything....

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mail essentially unusable after upgrade

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