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

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

Nov 24, 2015 4:44 PM in response to Lorkedien

Hi Lork and everyone,


Here you are. After 5 days of normal behavior Mail just went out of control again.

My log file 2015-11-25_IMAPSyncActivity is growing amazingly fast and below is the type of entry that are repeated all the time at staggering speed.

It is only related to my "BHB" mailbox which is an IMAP account and is an external provider (i.e. not iCloud, not Gmail or any like this).

Any clue ?


Thanks

Chak


Nov 25 08:34:02 Mail[9746] <Debug>: [BHB] Network operation: <IMAPFetchMailboxStatusOperation:0x7fd82b14a990> 6 mailboxNames: <4 chars>, <5 chars>, <6 chars>, <13 chars>, <16 chars>, <4 chars>, dataItems: 29

Nov 25 08:34:02 Mail[9746] <Debug>: [BHB Missed STATUS for 6 mailboxes: ECFAC125-D967-4C4B-95F8-8E48E04D6406 <4 chars>, EBB2C1B8-1521-493A-9098-34D733640145 <5 chars>, Drafts, Sent, Trash, Junk

Nov 25 08:34:02 Mail[9746] <Debug>: [BHB] Operation finished: <IMAPFetchMailboxStatusOperation:0x7fd82b14a990> 6 mailboxNames: <4 chars>, <5 chars>, <6 chars>, <13 chars>, <16 chars>, <4 chars>, dataItems: 29

Nov 25 08:34:02 Mail[9746] <Debug>: [BHB] Network operation: <IMAPFetchMailboxStatusOperation:0x7fd82b14a990> 6 mailboxNames: <4 chars>, <5 chars>, <6 chars>, <13 chars>, <16 chars>, <4 chars>, dataItems: 29

Nov 25 08:34:02 Mail[9746] <Debug>: [BHB] Missed STATUS for 6 mailboxes: ECFAC125-D967-4C4B-95F8-8E48E04D6406 <4 chars>, EBB2C1B8-1521-493A-9098-34D733640145 <5 chars>, Drafts, Sent, Trash, Junk

Nov 25 08:34:02 Mail[9746] <Debug>: [BHB] Operation finished: <IMAPFetchMailboxStatusOperation:0x7fd82b14a990> 6 mailboxNames: <4 chars>, <5 chars>, <6 chars>, <13 chars>, <16 chars>, <4 chars>, dataItems: 29

Nov 25 08:34:03 Mail[9746] <Debug>: [BHB - (null)] [<IMAPNetworkBlockTask(Unselect): 0x7fd82cd03e90> mailbox:(null) network priority 27] completed

Nov 25, 2015 6:20 AM in response to Chakdag

Chakdag wrote:


Hi Lork and everyone,


Here you are. After 5 days of normal behavior Mail just went out of control again.

My log file 2015-11-25_IMAPSyncActivity is growing amazingly fast and below is the type of entry that are repeated all the time at staggering speed.

It is only related to my "BHB" mailbox which is an IMAP account and is an external provider (i.e. not iCloud, not Gmail or any like this).

Any clue ?


Thanks

Chak


Nov 25 08:34:02 Mail[9746] <Debug>: [BHB] Network operation: <IMAPFetchMailboxStatusOperation:0x7fd82b14a990> 6 mailboxNames: <4 chars>, <5 chars>, <6 chars>, <13 chars>, <16 chars>, <4 chars>, dataItems: 29

Nov 25 08:34:02 Mail[9746] <Debug>: [BHB Missed STATUS for 6 mailboxes: ECFAC125-D967-4C4B-95F8-8E48E04D6406 <4 chars>, EBB2C1B8-1521-493A-9098-34D733640145 <5 chars>, Drafts, Sent, Trash, Junk

Nov 25 08:34:02 Mail[9746] <Debug>: [BHB] Operation finished: <IMAPFetchMailboxStatusOperation:0x7fd82b14a990> 6 mailboxNames: <4 chars>, <5 chars>, <6 chars>, <13 chars>, <16 chars>, <4 chars>, dataItems: 29

Nov 25 08:34:02 Mail[9746] <Debug>: [BHB] Network operation: <IMAPFetchMailboxStatusOperation:0x7fd82b14a990> 6 mailboxNames: <4 chars>, <5 chars>, <6 chars>, <13 chars>, <16 chars>, <4 chars>, dataItems: 29

Nov 25 08:34:02 Mail[9746] <Debug>: [BHB] Missed STATUS for 6 mailboxes: ECFAC125-D967-4C4B-95F8-8E48E04D6406 <4 chars>, EBB2C1B8-1521-493A-9098-34D733640145 <5 chars>, Drafts, Sent, Trash, Junk

Nov 25 08:34:02 Mail[9746] <Debug>: [BHB] Operation finished: <IMAPFetchMailboxStatusOperation:0x7fd82b14a990> 6 mailboxNames: <4 chars>, <5 chars>, <6 chars>, <13 chars>, <16 chars>, <4 chars>, dataItems: 29

Nov 25 08:34:03 Mail[9746] <Debug>: [BHB - (null)] [<IMAPNetworkBlockTask(Unselect): 0x7fd82cd03e90> mailbox:(null) network priority 27] completed



I don't have any new ideas, just an old gripe. This thread is absolutely LOADED with clues that likely would mean a lot to the developers, yet there's nothing we can do other that HOPE that someone on the Mail development team is monitoring this and one day we'll look at our Docks, see a little badge number on the App Store icon, find out there's a software update, possibly not even NOTICE that the "details" says something like "usability improvements in Mail," and from then on the only new posts in this thread will originate from people who don't have their systems currently updated.


What a way to run a company. I'll bet they'll never amount to anything 😉


On the other hand, I wasted a good bit of last weekend demonstrating to myself just how amazingly hard integrating communications across the whole planet actually is. Idly browsing the web I stumbled across a post on why privacy is so important, from the online journalist and privacy advocate Micah Lee, who originally connected Edward Snowden with Glenn Greenwald (The Guardian) and a writer from the Washington Post. My curiosity whetted, I downloaded his treatise ''Encryption Works: How to Protect Your Privacy in the Age of NSA Surveillance." Three days later, I've mostly convinced myself how much it doesn't work. I've succeeded in brining one of my IMAP accounts to its knees by saddling it with GPG privacy, and now, every time I try to tell my son a joke I have to go through machinations to convince my Mac that I don't have to protect that message from the rest of the universe. Then there's "Tails" the hardware-agnostic OS that runs on "any modern Intel processor computer." It comes loaded with the TOR browser, messaging and email clients, etc, etc., but stores NOTHING once you shut it down. HOWEVER, it doesn't understand "Retina" displays, considers Bluetooth a lethal security risk, and the open source folks who work on it speak to the rest of us in gibberish so arcane that even when they TRY not to obfuscate they needn't worry about too many people understanding what they're saying! (I did find one chilling secret in their official open source documentation, however. It read something like "we're not too familiar with Macs.")


So, I got it all "working," but it occupies a tiny corner of the screen on my MacBook Pro. On the other hand, it FILLS the screen of my 27" iMac, but until I dug a USB keyboard up from my basement, I couldn't DO anything with it, and I'm still not very good at moving the cursor with arrow keys and blind stabs at random combinations of the fn, control, option, and command keys (I no longer have any wired mice).


Jim Robertson

Nov 25, 2015 7:24 AM in response to JimRobertson

Hi Jim, I'm sure Apple has to solve this, we can make patches but the solution is in Apple hands.


In the previous versions of Mac OS, Mail was working without problems, two months ago Apple releases El Capitan with a new Mail version and something goes bad, Mail goes in a crazy error log loop and all, modern and old computers with conflictive IMAP or Exchange servers goes completely unusable.


I don't really understand what the Mail development team is doing, 😠 I'm sure the solution it's a very stupid thing, starting with not to log anything except if the user check the "registry connection activity" at the "connexion inspector window" (which now doesn't really do nothing).


I solved my problem, yes, but I'm really disgusted with Apple because this kind of errors are absolutely inaceptable, and not to solve it after two months... I can't find a better reason to fire to the Mail app responsible at Apple.


We are talking under the apple.com domain, this is not a private conversation, and they never take part, never said anything, nor apologies, nor "we are working on this" just silence, just a "**** you all", "we have to work on iOS 10 for the iPad Pro 2016 version and we don't really are going to spend time on an obsolete previous era OS", Jobs said, PC's are dead, and that means iMac, Macbooks... are dead too for them... of course we all have accepted on iOS that all apps goes through App Store, it's good to think that our apps doesn't have virus because they review all apps and take care of us, so if they kill Mac OS and in a not far future all devices / computers are iOS they will have a 30% of all sell apps, all.

Now when you buy and install Photoshop in a Mac, Apple doesn't have nothing to do, if they force that all Mac installed apps goes through Mac App Store to get their 30% could be a revolution, but if you simply move all your users to iOS, where they feel confortable with the App Store, and force developers to make their best and profesional apps for iOS and jump through the hoop of the App Store, it's not so perfect? 30% vs nothing, its a good piece of the cake for Apple I think.


Sorry for the speech, said that, have you verified that you have the archive mail option I posted on previous messages disabled? In my case disabling that checkbox all my problems with mail were solved.

Nov 25, 2015 8:25 AM in response to Lorkedien

Lorkedien wrote:



Sorry for the speech, said that, have you verified that you have the archive mail option I posted on previous messages disabled? In my case disabling that checkbox all my problems with mail were solved.


Are you talking about the two steps that included turning off compacting mailboxes (which was in Exchange 2003 but not later Exchange versions where Apple implements EWS)?


(in any event, that's probably NOT relevant to me, because in my case it wasn't an Exchange account, but rather an IMAP account that was causing my problem; I have two Exchange client Accounts on my Macs, but one is Exchange 2007 - we run the Server; the other is probably a newer Server version; I'm not sure).


As an end user, non-developer, struggling to guess what I'm reading when looking at logs, my sense is that we're encountering different bugs that produce a similar outcomes (mushrooming log files which obliterate the application memory space). As I've stated previously, once I noticed that the culprit IMAP account didn't cause this issue on another machine, or even on the SAME machine if the account was created anew in a test user space, I simply deleted the "injured" account and recreated it a moment later in my main user space. That was at least 3 weeks ago now, and Mail has been as friendly as a newborn puppy ever since. Of course,that's not worked for some people. I'm continuing to follow this thread because I'm curious. My best guess is that Apple does have people (or maybe just bots) who monitor this community, and that some of our ranting and raving actually will lead to bug fixes eventually (but, as I stated previously, I'll bet that when the bug or bugs are fixed, we'll never be told in a transparent fashion).


Jim

Nov 25, 2015 6:45 PM in response to Lorkedien

Lorkedien wrote:


Sorry for the speech, said that, have you verified that you have the archive mail option I posted on previous messages disabled? In my case disabling that checkbox all my problems with mail were solved.


Hi Lork and Jim,


Yes I have tried this but it didn't work for me as I am also dealing with IMAP accounts.

In any case, the issue just got bigger in my case and not only my external IMAP account is being the issue, but now my iCloud account has started doing the same i.e. crazily logging entries into the IMAPSyncActivity.log

Jeffeckman, you might be right, as both my mailboxes are pretty large (+/- 10,000 messages with attachments in each).


Anyway, no more choice, I just shut down Mail and now deal with my mails directly in my web browser... what a shame !


Speaking about Apple, when all this started for me I have contacted Apple and had a chat with someone from their support. Nothing came out. A couple of days later someone from Apple Engineering called me (yes they called !) and they wanted me to run some diagnostics through terminal and send them the results. Did that twice, got a lot of thanks from Apple and so far nothing has happened, no more contact, no more update. Like you I believe it is insulting that such a company doesn't take issues like this seriously that affect one of their major apps and mostly a certain huge amount of users.

Almost 5000 views to this thread and we are still at square 1 and I believe most of the contributors here are pretty proficient with Mac. Imagine the enormous amount of people who don't understand Mac OS to this point and are affected by the issue without knowing what is going on !


I'll give another shot to Apple support and we'll see. Hanging on the goodwill of such big corporation is somewhat disturbing...


Have a good day everyone


Chak

Nov 26, 2015 10:56 AM in response to jcw289

Okay - replying to my own post and, inappropriately the main subject is NOT the memory leak.

Although the above solution from miguel.apple worked to clear the memory leak, Mail has continued to be unstable. It is crashing on average twice a day, under various circumstances. The crash logs do not appear to be identifying a single cause. This has been the most dissatisfying OS X update for me to date. And I waited for a couple of months before updating. Very aggravating.

My recommendation to anyone still on Yosemite is .... Wait. This could be a while.

jcw

Dec 8, 2015 4:27 AM in response to Bhobina

Thanks Bhobina,


I did try your suggestion, and for a while, it seemed like it was going to work - once restarting the mail app, it went through the synchronisation for my gmail account a lot faster than before, while not increasing the memory usage as fast as before. However now, it seems to be stuck at about 2 third of the email count left to synchronise and the RAM usage keeps going up quite fast to the point it should run up the available RAM within a few minutes.


This only started for me after the upgrade to El Capitan and I am running on a MAC Pro bought in 2014 - hence pretty solid hardware.


What bothers me the most is that Apple has not even posted anything, responded anything to this thread (they do monitor I am sure) - even to say they are aware of the issue and working on it.


This is a big deal, and makes Apple look like they are now handling users the same way Microsoft used to in earlier years.


Disappointing.


I do hope some other posters who have more time to investigate the issue will take the time to share their insights


Cheers


Stephane

Dec 29, 2015 5:26 PM in response to Lorkedien

Hi guys,


As promised I report back on this matter after having gone through it with Apple Engineering for a couple of weeks and it was finally successful.

I was experiencing memory leak and massive CPU usage due to an abnormal logging process by Mail App with IMAP accounts.

Deleting the log files or the mail containers were solving the problem temporarily but it was repeating after a couple of days.


After some weeks of testing and regular calls with an helpful Apple Care guy who was following my problem, they came to the conclusion that it was most likely my antivirus which was the source of the problem. I had Avast (free version) installed.


So here is what we did :


1. Remove all LaunchAgents that were pointing to Avast

In User>Library>LaunchAgents => remove all avast services

In System>Library>LaunchAgents => remove all avast services if any


2. Remove the login items pointing to Avast if any

In System Preferences>Users and Groups>Login Items


3. Uninstall Avast


Since then, no more memory leak, no more high CPU usage and a very well behaved Mail App.

I have been monitoring Mail for about 4 weeks now and it is all working well.


It happened to me with Avast, but according to Apple it is likely that it can happen with other similar applications that scan / monitor the system.

So if you don't have Avast but something similar that runs in the background, try to get rid of it and see how it works.


Hopefully this will help those who haven't resolved the issue yet.


Happy New Year


Chak

Dec 29, 2015 6:04 PM in response to Chakdag

Chakdag wrote:


Hi guys,


It happened to me with Avast, but according to Apple it is likely that it can happen with other similar applications that scan / monitor the system.

So if you don't have Avast but something similar that runs in the background, try to get rid of it and see how it works.


Hopefully this will help those who haven't resolved the issue yet.


Happy New Year


Chak


My experience with the unbelievably rapid growth of the log files was similar to yours, but I don't have software monitoring my MacBook Pro system in the background. In my case, it was my iCloud account that was gobbling processor time and RAM. Some have had it with Exchange accounts. In my case, it all began after I upgraded to El Capitan. After I demonstrated that a new iteration of the same email account in another unix user space on the same laptop behaved normally, and that the same (synchronized) IMAP account on another Mac (an iMAC) didn't mis-behave after the El Capitan upgrade, t deleted the misbehaving account from my own default Mac user space on the laptop, then added the same email account back in, and I've not had any more of that issue for over a month now. So, the common thread seems to be that SOMETHING triggers explosive growth of the log files and there's no fault tolerance for whatever does it, but the trigger can be different for different people, as seemingly, can be the solution. I think that in my case it was an incompletely downloaded message, but I'm not certain.


Jim Robertson

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 ID.