Yosemite OS 10.10 Mail Memory Leak

Since upgrading to Yosemite I have ran out of memory (MacMini, 16 Gbytes) three or four times. I have traced this to Mail.app. The trigger seems to be when you drag multiple files into the email to have them included. Then, the memory usage starts racing, eventually using up all free memory within seconds. The only way to recover is to use Force Quit from the Activity Monitor, normal Quit from within Mail does not work. See the attached screenshot. By the time I grabbed the screen shot and pressed Force Quit, it was already up to 17 Gbytes of Memory.


Has anyone else came across this problem?


User uploaded file

iPad 2

Posted on Oct 19, 2014 5:17 PM

Reply
326 replies

May 1, 2015 1:12 PM in response to mswamp

This bug pre-dates Yosemite. It has plagued me daily for 2 years on two work machines (newer MacBook Pros). I've tried everything but can't leave Mail open for more than 20 minutes or so. If I don't kill Mail in time, then eventually every other running app will "Pause" and I can't Force-Quit any of them so I have to do a hard reboot.


This bug does not happen on my personal machines. The only difference is my work machines run corporate images of the OS. And no, I don't use Exchange in my Mail app — I use it only in Outlook.


Shame on Apple for not addressing this heinous bug after many bug reports.

May 1, 2015 2:01 PM in response to RobotJomo

The bug reproduces on a clean install. You can easily confirm this by creating a new user account on your Mac and syncing your Mail accounts indirectly by using your iCloud Apple ID.


I happen to have 2 accounts on my own email server and 1 iCloud account. It doesn't seem to matter what messages I actually keep on those mail servers. I archive all of them locally on the 1st of the month (today), but that doesn't stop the leak. The leak seems to have something to do with Mail's attempt to cache a gazillion emails that simply don't exist. You can see this status occasionally in Mail's Activity Monitor window, and then you know you should kill the app. Clearing out that cache from the Finder doesn't help, either.


So I think the Mail app is 100% responsible for this leak and Apple is just playing dumb about it as usual. For two years.

May 8, 2015 6:27 PM in response to mswamp

This same thing is happening to me so I turned off my mail app thinking that would help, but no luck. I'm currently working with Pro Res footage in FCPX 10.2 and that's the app that runs out of Application memory and usually the only other apps that are running are garageband and safari. But still, this shouldn't be an issue. I have 12 gigs of ram.


Apple needs to patch this problem asap. Get on it geniuses!

Jun 4, 2015 8:34 PM in response to mswamp

On my iMac 27" late 2009, with OSX 10.10.3 installed, I have just encountered this issue for the first time.


An out of memory warning was encountered. Selecting a specific email in the inbox with a PDF attached to it instantly starts chewing up memory, as it attempts to "preview" the PDF attachment, I imagine.


With Activity Monitor active, a "Mail Web Content" process is seen to appear as soon as the email is selected. This process persists indefinitely, chewing up memory in ever increasing amounts. Memory pressure is immediately indicating red as soon as it appears. There is intense disk activity, and everything slows to a crawl. The problem appears to be repeatable.


The "Mail Web Content" process has to be selected and force-quit in Activity Monitor in order to bring things back to normal. I also had Activity Monitor take a "sample" of the offending process, and that sample has been saved. The PDF attachment to the email does not appear to cause a problem for non-Mac users, who can view and print the PDF's content without consequence. No one has reported seeing any malware alert (I have Sophos home edition installed). So I am guessing it is just a memory leak specific to Apple's PDF rendering software.


It is certainly a debilitating problem when it occurs. If forwarding the Activity Monitor sample of the "Mail web content" process, or the triggering PDF, would help to solve this issue, let me know.

Sep 7, 2015 10:27 PM in response to mtb_ian

I'm having the same problem with 2 Gmail accounts set up with Imap. I read on another forum that Mac Mail and Gmail have compatibility issues. I go into preferences re-enter the passwords for the accounts that don't download this method usually works. But if I don't log into Mail for a longer period, I re-enter the passwords and log into the troublesome accounts in Firefox to reset the connection Between Mac Mail and the Gmail server. Some of my Hotmail accounts do the same thing but they correct themselves on their own. I just re-entered my passwords for my 2 troublesome Gmail accounts and the messages just downloaded to mail for both accounts. Use this procedure if Gmail or Go Daddy accounts are the ones causing Mail to crash.

Sep 9, 2015 12:29 AM in response to mswamp

What definitely helped me:


NO drafts, NO 5 minute interval, NO idle checking/unchecking and so on...


1) I backed up complete folder Mail in ~/Library/ and deleted all the accounts from Mail.app

2) I disconnected power cord and let my iMac (2013) without power overnight. (Don't know, if this played some role, but i did it.)
3) Next morning I started it after 7 hours cold.
4) I deleted file Container.plist and folder Data from ~/Library/Containers/com.apple.mail
5) I deleted file Envelope Index and folder V3 from ~/Library/Mail

6) I started Mail.app and set three mail accounts: iCloud, Gmail and one local IMAP account.


Now all works fine and Mail.app takes about 100 MB RAM.


User uploaded file

Nov 17, 2015 10:43 AM in response to gary.liddle

Just started having this problem, but sporadic. Am on 1and1 with 4 accounts and Gmail and iCloud. Mail 9.1, OSX 10.11.1. Can't say for sure when it started, but seems more recent than even the last El Cap updates. Two year old Mac Book Pro 16GB. 63GB for Mail.


User uploaded file


I'll mark this suggestion in case it reoccurs. I am trying an earlier suggestion to "uncheck the Use IDLE command if the server supports it." What is this BTW?


Mainly posting to show that it still (or for me newly) happens under El Cap.

Nov 18, 2015 11:58 AM in response to mswamp

The memory leak in Mail is obvious when you watch it happen on "Activity Monitor" program found in your utilities. I tried many fixes from all over the net and none worked. Finally I ran Onyx a free mac program that runs a lot of the normal cleanup routines that you can access in terminal. This has completely fixed the problem for the last 24 hours. I've used this software for many years through all its updates on 8 or 10 different Mac's without any problems.

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.

Yosemite OS 10.10 Mail Memory Leak

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