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

Oct 23, 2014 4:23 AM in response to mswamp

+1


I'll add my voice to the choir. I have a number of systems and they have all been affected by Yosemite similarly. With mail open the systems become locked over a short period of time with the 'out of application memory' error. The only way I've been able to keep the systems running is open mail and close it as soon as you're finished.

Oct 23, 2014 5:35 AM in response to Doren_Sean_Michael

I have run for 24 hours without incident now after doing the following (not sure if all are required but it's been stable):


1) Rebuilding Mailboxes. This takes some time. Go get lunch. But it seems to be a piece that wasn't in other solutions that worked and then failed.

2) Starting Mail with Shift held down. No idea if this works but I'm doing it like wearing the same socks through the World Series.

3) Preferences ... check mail every 5 minutes versus automatically.


All were suggested, and when I completed all of them I've noticed that its stable. #2 by itself definitely did not work but I can't trace between #1 and #3.

Oct 23, 2014 6:10 AM in response to mswamp

mswamp wrote:


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?

I didn't bother to read the entire thread. But there are some important plot points here.


First of all, this is most definitely a bug in Mail and perhaps the OS itself. It should never get to 17 GB or 42 GB of memory usage. This is probably dependent on your e-mail ISP and how you have configured Mail. It seems to be getting itself into a loop with draft files that keep cycling back and forth from the server. The best solution would be to turn off internet, launch Mail, delete your drafts, turn internet back on, and keep deleting drafts as fast as you can unit lit settles down. Then quit and relaunch. Maybe it will help, maybe not - just something to try.


There really is no differentiation between "released" and "beta" software from Apple anymore. It's all the same and we are all beta testers, willingly or not. If you want to use Apple software, you have to learn the bugs. If there is something that causes problems for your system, then don't do that. Maybe drag files one at a time. Maybe try to use the menu options or the attach button. The bug may be specific to your ISP so other people may not experience it. That doesn't mean it doesn't exist. I cannot reproduce this particular bug but I can't deny those screenshot. When I attempted to reproduce the problem, I immediately found other obvious bugs.


Considering that we are all beta testers, it is our responsibility to file bug reports. The Apple Bug Reporter is at: https://bugreport.apple.com/. Just don't expect the bug to get fixed. To see a bug fix in a 10.10.1 release, there would literally have to be tens of millions of reports. You should still file the reports, but learn to live with the bugs. The one bug I saw was one I had reported years ago. I am not exaggerating about the tens of millions of reports. There are no magic fixes. You just have to learn the system and don't do the things you know will crash it.


Going along with this, it is important to properly discriminate between different issues. As beta testers we shouldn't confuse them. Having a low level of free RAM is not a bug. That is just the way the OS works. Having hundreds of MB of memory usage for an app is not a bug. That is just normal software bloat. It has to be GB before it is anything worth noticing. If you get the "out of memory" error, that is a problem that should be reported. It should never happen unless you were critically low on disk space. And you should not get critically low on disk space because Mail is taking 42 GB of disk space for swap files. That's a bug.

Oct 23, 2014 6:19 AM in response to daring_rant

Every developer I know including myself have filed bug reports. Yesterday I followed the following list and have not had an issue since. It's still a bug, and should not have to go through all this, but in the time it takes for Apple to update and get it out to everyone, this should keep you from pulling your hair out...


• Deleted index files, and rebuilt each mail box

• Changed Automatic setting to 1 or 5 minutes (both worked for me)


A few others here have suggested unchecking all features in Advanced tab, but I didn't do that and have had a stable environment so far. However, I have not sent many emails including multiple attachments yet which seems to be a trigger for some here. If I do that and see any problems, I'll try the Advanced settings tab.

Oct 23, 2014 6:19 AM in response to emacinbound

Update: It happened once for me yesterday (very productive day) and 2 times in past 45 mins for me. Doing the same thing as I always do on my Mac. Nothing different. Cannot pin-point this on any app/etc. It did happen once while I was working on an email draft - which it then became very difficult to save the draft before Force Quitting out of Mail.


Google's Inbox is looking better and better right now. Wait til they get wind of this Mac Mail bug.

Oct 23, 2014 6:30 AM in response to etresoft

The Draft issue sounds plausible and what I've been describing in a few posts as well it does seem to tie in with that behavior. So I ran a few tests and my iCloud account does not seem to be affected (anyone else?), only my IMAP GoDaddy account. I verified that my Draft folder was clean locally and on the server. I was able to trigger it by saving a test Draft but, unfortunately, I was not able to remove the Draft nor after the test email was immediately sent so it continued to sync the Draft folders, I'm guessing, and my only option was to Force+Quit before it locked up my system. Which then left the Draft in the folder. It does appear that we're getting closer to the core issue, alas, still with no real solution yet per se.


Just performed another test. I disabled "Store Draft messages on the server" for my IMAP GoDaddy account and was able to compose an email, save a Draft, and the memory leak did not occur. At least as of yet. If this is the core issue, this might be temp fix? Doesn't help since I really need my Drafts saved on the server, but, at least, I can, possibly, continue to use the app. I'll post updates.


Please let us know if anyone else attempts this and what your results are.


Hopefully it continues to work. Thank you etresoft.

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.