10.11, Mail.app Memory Leak?

About 24 hours after upgrading to OS 10.11 (el capitan), Mail.app had essentially used up all available system memory bringing up the "Your system has run out of application memory" dialog and necessitating force quitting Mail.app. Since that initial force quit, Mail.app will reliably repeat this cycle when force quit and restarted — it works for about 5-10 minutes while it gobbles up RAM (apparently reading disc and dumping directly into RAM as the bytes read from disc in activity monitor initially correlate closely with the memory used). System reboot didn't break the pattern. I don't have any extensions installed in Mail...


Any thoughts? Feels like a memory leak. I can't imagine what its reading from disc - 120 gb is a substantial chunk of my hard drive...so, it seems it must be doing something repetitive...

User uploaded fileUser uploaded file

MacBook Pro with Retina display, OS X El Capitan (10.11), stock machine, no add-ons.

Posted on Oct 2, 2015 5:41 AM

Reply
79 replies

Oct 22, 2015 4:39 PM in response to tvtimedirect

tvtimedirect wrote:


this only fixes the problem for a day - the machine crashes the next day. all files back and memory hog again and machine is so slow until it finally crashes

your post and that from "The Town Fool" lead me to wonder whether either of you has read the entire thread. I don't pretend to know exactly what's wrong, but I think that Chakdag and I have demonstrated adequately that, at least in our experiences being afflicted by this problem, the log files grow at an explosive rate because they're faithfully documenting some interaction between server and client that doesn't complete and repeats at an amazing rate, producing alarmingly rapid growth of one daily log file and the sequential zips of those logs that accumulate on a daily basis.


While you still HAVE the problem, you should launch your "Console" app and watch those tiny log file messages accumulate.


Both Chakdag and I found that if we deleted the incriminated IMAP or Exchange account from the afflicted machine, it apparently repopulates the client (your Mac) with an unaffected copy of the email account, solving your problem. (If you're unwilling to delete it, you can look at the console application after you take the account "Offline" temporarily and see if that stops the log file(s) from growing while it's offline. If so, there's hope for you.


As I did before, I must caution that the "fix" that's worked for us may cause other problems if the account in question is a POP account, because once messages from a POP server are delivered to your Mac they may well no longer exist on the server. If you delete the messages in a POP account without archiving them locally, they could be gone forever.


If you do try deleting and re-creating your IMAP or Exchange account and that works (or does not work) please report back.


Thanks a bunch.

Jim Robertson

Oct 22, 2015 4:47 PM in response to The Town Fool

The Town Fool wrote:


Well my mail leak started after the 10.11.1 update so I don't think it's that.


And thanks for the fix everyone.

Please look at my adjacent response to "tvtimedirect." Open your Console application and see if you have messages appearing rapidly in a mail log file, and, if that's the case, whether you can identify the offending mail account, take it temporarily offline, and see if that stops the messages from populating the log file. Your post suggests that just deleting the log files solved your problem, but in some (perhaps many) cases it does not, because the log files themselves aren't the cause of the problem, rather a consequence of it.


If that simple exploration tells you something, please post your findings.


Jim Robertson

Oct 22, 2015 6:36 PM in response to The Town Fool

Hi Guys,


I have upgraded to 10.11.1 and unfortunately this is not fixing anything.

It appears the only workaround at the moment is to identify your IMAP/Exchange account which is generating the trouble, delete it, reinstall it (see JimRobertson's and my posts above).


But it appears that it is not a permanent fix:

The new issue I am going through at the moment is that it worked for a couple of days, but for the past 2 days Mail is not fetching messages from the IMAP account in question, and the log file grows rapidly again = RAM consumption goes up.

So it seems that something resets Mail to its erratic state at some point.


Now trying to identify what it is.


Chak

Oct 23, 2015 6:03 AM in response to JimRobertson

i get a lot of this

10/23/15 8:59:36.122 AM com.apple.preferences.icloud.remoteservice[11351]: iCDP status for DSID 273161739 is DISABLED

10/23/15 8:59:42.437 AM secd[6947]: __SOSCCProcessSyncWithAllPeers_Server_block_invoke sync with all peers failed: Error Domain=com.apple.security.sos.error Code=1032 "peer: TVdv7kU0ACKjP2HRo0rx8CNq0D not found" UserInfo={NSDescription=peer: TVdv7kU0ACKjP2HRo0rx8CNq0D not found}

10/23/15 8:59:42.443 AM CloudKeychainProxy[6948]: __39-[UbiqitousKVSProxy doSyncWithAllPeers]_block_invoke_2 <UB--s--C---> syncWithAllPeers (null), rescheduling timer

10/23/15 8:59:57.450 AM secd[6947]: __SOSCCProcessSyncWithAllPeers_Server_block_invoke sync with all peers failed: Error Domain=com.apple.security.sos.error Code=1032 "peer: TVdv7kU0ACKjP2HRo0rx8CNq0D not found" UserInfo={NSDescription=peer: TVdv7kU0ACKjP2HRo0rx8CNq0D not found}

10/23/15 8:59:57.455 AM CloudKeychainProxy[6948]: __39-[UbiqitousKVSProxy doSyncWithAllPeers]_block_invoke_2 <UB--s--C---> syncWithAllPeers (null), rescheduling timer

10/23/15 9:00:05.637 AM com.apple.xpc.launchd[1]: (com.apple.screensharing[11389]) Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.screensharing.server

10/23/15 9:00:12.462 AM secd[6947]: __SOSCCProcessSyncWithAllPeers_Server_block_invoke sync with all peers failed: Error Domain=com.apple.security.sos.error Code=1032 "peer: TVdv7kU0ACKjP2HRo0rx8CNq0D not found" UserInfo={NSDescription=peer: TVdv7kU0ACKjP2HRo0rx8CNq0D not found}

10/23/15 9:00:12.498 AM CloudKeychainProxy[6948]: __39-[UbiqitousKVSProxy doSyncWithAllPeers]_block_invoke_2 <UB--s--C---> syncWithAllPeers (null), rescheduling timer

10/23/15 9:00:27.653 AM secd[6947]: __SOSCCProcessSyncWithAllPeers_Server_block_invoke sync with all peers failed: Error Domain=com.apple.security.sos.error Code=1032 "peer: TVdv7kU0ACKjP2HRo0rx8CNq0D not found" UserInfo={NSDescription=peer: TVdv7kU0ACKjP2HRo0rx8CNq0D not found}

10/23/15 9:00:27.659 AM CloudKeychainProxy[6948]: __39-[UbiqitousKVSProxy doSyncWithAllPeers]_block_invoke_2 <UB--s--C---> syncWithAllPeers (null), rescheduling timer

Oct 23, 2015 6:22 AM in response to tvtimedirect

10/23/15 9:22:11.883 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:12.216 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:12.482 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:12.828 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:13.099 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:13.443 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:13.700 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:14.027 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:14.283 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:14.657 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:14.958 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:15.303 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:15.560 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:15.569 AM Safari[586]: tcp_connection_tls_session_error_callback_imp 22 __tcp_connection_tls_session_callback_write_block_invoke.434 error 22

10/23/15 9:22:15.892 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:16.144 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:16.471 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:16.712 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:17.072 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:17.327 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:17.656 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:17.899 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:18.242 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:18.501 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:18.859 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:19.112 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:19.442 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:19.683 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:20.012 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:20.268 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:20.598 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:20.868 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:21.099 AM secd[360]: __SOSCCProcessSyncWithAllPeers_Server_block_invoke sync with all peers failed: Error Domain=com.apple.security.sos.error Code=1032 "peer: TVdv7kU0ACKjP2HRo0rx8CNq0D not found" UserInfo={NSDescription=peer: TVdv7kU0ACKjP2HRo0rx8CNq0D not found}

10/23/15 9:22:21.104 AM CloudKeychainProxy[378]: __39-[UbiqitousKVSProxy doSyncWithAllPeers]_block_invoke_2 <UBK-s-pC---> syncWithAllPeers (null), rescheduling timer

10/23/15 9:22:21.217 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:21.454 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:21.769 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:22.023 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:22.368 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:22.639 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:22.982 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:23.225 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:23.567 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:23.809 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:24.139 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:24.393 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:24.723 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:24.964 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:25.309 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:25.548 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

10/23/15 9:22:25.877 AM identityservicesd[359]: [Warning] No old protection identity, not returning message protection data

Oct 23, 2015 6:47 AM in response to tvtimedirect

tvtimedirect wrote:


i get a lot of this


In my case, the log was accumulating literally dozens of identical entries per second that clearly originated from my Exchange account, and that stopped instantly when I took the Exchange account offline, started again immediately when I put it back online.


It doesn't look as though your log entries are coming from mail


You can use Activity Monitor to watch the alarming growth rate of the log files.


Are you still having troubles with Mail itself now? Do you still have enormous files at ~/Library/Containers/com.apple.mail/Data/Library/Logs/Mail/


(Command-Shift-G in Finder and paste in the above path to get there)


Thanks a bunch for posting.

Jim Robertson

Oct 25, 2015 7:29 PM in response to JimRobertson

Hi Guys,


A question for you all but particularly JimRobertson : is your issue with Mail redundant or not ? in other words, after you've been through the process of deleting logs and deleting/reinstalling your culprit IMAP or Exchange account does Mail remains stable or reproduces the issue after a while ?


Because in my case, I can't seem to get it back to normal anymore. As soon as reinstall my IMAP account, log entries start piling up and log file size keeps growing at an alarming rate.


Thanks for sharing


Chak

Oct 25, 2015 8:55 PM in response to Chakdag

In my case it was an Exchange account. It was afflicted on one Mac after I updated to El Cap, but not on another still running Yosemite. I created a test user on the El Cap machine and added the Exchange account there; no issues. That's what prompted me to try deleting and re-adding Exchange account to my default user account there, and thus far (at least a week, I think), the account has been perfectly well behaved. I upgraded the other Mac to El Cap, and nothing happened to the Exchange account there as a consequence of the 10.10 to 10.11 upgrade.


Jim Robertson

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.

10.11, Mail.app Memory Leak?

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