Lion mail.app memory leak?

New MBP, 120 GB SSD, 4GB DRAM, 20 GB free space on SSD. Boot up, run mail.app. Mail.app continues to take more DRAM and swap space on drive until I get a message that the hard drive is full and looking at memory resources I can see that mail.app is at maximum DRAM usage. I then have to quit mail and reboot. Mail is behaving erratically, some of the messages open blank. If I quit mail and reopen they are displayed correctly. Some messages apparently don't send. But if I look at the Sent mailbox there they are, sent. Back in the main window the message is still on my screen as I composed it. If I dismiss it it states that I am erasing the message, but again, the messages are filed properly under sent. I have been using Macs since 1989. I know my way around a fair bit. I conclude from the posts here that there are serious problems with memory usage in Lion. My real question is: when will Apple post a fix and get it into distribution?

MacBook Pro, Mac OS X (10.7.2), 4GB, 120GB SSD

Posted on Nov 1, 2011 7:12 AM

Reply
17 replies

Nov 1, 2011 7:16 AM in response to josephoconnor

You won't find an answer on this forum. Terms of use specifically forbid speculation, and this is a user to user forum. Apple's development team is under non-disclosure agreements, and violating it would be against the law, which one should not engage in doing on this forum. Instead, try to determine what could be filling your hard drive. See my FAQ*:


http://www.macmaps.com/diskfull.html

Nov 1, 2011 8:53 AM in response to josephoconnor

Yes, Steve's last words!


I too was impressed by the eulogy from Mona Simpson.


Anyway if Apple does have a problem with memory management, how come my Lion on 2 GB of RAM on a MacBook Pro 3,1 and 2 GB of RAM on an iMac 5,1 have no problem using Mail with over 10 GB of e-mail?


My point is, if it was an _Apple_ problem, all of us would face it. There is obviously some contributing factor which has not yet been isolated. Do you wish to continue blaming Apple, or do you wish to isolate the issue?

Nov 9, 2011 1:35 PM in response to a brody

@a brody, just because you aren't having the problem doesn't mean it doesn't exist. Your link, although somewhat useful, is not helpful in this situation. There are way too many variables involved (how you connect to email, are you using pop/imap/exchange, how many email accounts to you connect to, blah, blah blah) for you to make a blanket statement like that and it be true.


Apple has notibly been very slow to recoginize issues publicly and even address them. I have stumped Apple's tech support on numerous occasions, even upon escalating.


I have 8GB of RAM on my Mid-2010 MBP and I have this same issue. I can watch in Activity Monitor, the amount of RAM that mail.app uses grow from 52MB when I first open the app to >6GB. There is something definately wrong with mail.app. When an application can no longer use RAM because there is none to be had, it will start paging memory to disk, which is when you can run out of disk space if you have a limited amount available.


I have to restart mail.app at least twice a day to overcome this issue then close it when I am done with my work day.


This issue only started when I upgraded to Lion and they released a new version of mail.app.


I am with @josephoconner, I hope they resolve this issue soon!

Nov 9, 2011 2:01 PM in response to boogybren

I'm not saying the problem doesn't exist. But the finger is being pointed at the wrong direction. There are many computer issues that only arise when multiple factors play. lf you are having RAM issues, it likely is the RAM itself, not the program. And here is why*:


http://www.macmaps.com/badram.html


I've left my Mail program on all day for a week at a time.

And only 2 GB of RAM on my 2.2 Ghz Core2Duo computer. I find it hard to believe that the issue is exclusively due to Mail, given how big my mail account folders are. If you can give me the exact set of conditions it is happening, perhaps I can see if it can be reproduced.

Nov 9, 2011 2:16 PM in response to a brody

Bad RAM is bad RAM. There is never a case where bad RAM would cause only one application out of many to blow up to exhorbinant usage. You would see OS level issues like crashes and kernel panics with bad RAM.


I use anywhere from 8-20 applications open concurrently. None of them gradually increase their memory footprint except for mail.app unless I give it reason to (open up more tabs in Safari etc..) You would need to do a heap or core dump of the mail application and have the right tools to be able to analyze that binary in order to know why mail.app is doing what it is doing.


Size of your mail folders are moot because mail isn't going to load or even access all 10GB into RAM or even page it unless you opened all 10GB of email concurrenlty, which you can't do anyway.

Nov 10, 2011 5:16 AM in response to boogybren

Well you must have something installed as an addon for Safari, or Quicktime that Mail can't handle, or possibly a router firmware issue causing the network packets to be unreadable to Mail. Something of that sort is happening. Mail works just fine with less RAM on a lesser machine, and Lion is optimized for the newest machines. The fact the issue is happening on a newer machine itself and not an older says, some contributing factor has to be at work. Don't point the finger on Mail alone.

Nov 10, 2011 9:50 AM in response to a brody

You are right...sort of.


When troubleshooting, it's important to have a broad perspective and consider all things. It's even more important to troubleshoot the right things.


If I went into the doctor with a hurt arm and he wanted to do a digital rectal exam as the first course of action, I would be finding a new doctor.


You have to ask yourself: What is the problem?


We know that it is: Mail.app has a growing memory footprint problem.


The next question you need to ask yourself is: What can cause this problem and how can it cause it?


Let's look at some of the things you propsed:


- software addon to another piece of software: This is Unix not Windows. If you install a plugin for Safari for example, it will never interfere with another app like Mail.app because the applications run completely independent of each other. Likewise with Quicktime. Mail can call Quicktime to preview a media file attached to an email, but it calls it as a separate application, not a plugin. If Mail.app had an issue when calling Quicktime to preview a file, then yes, it could be a Quicktime issue OR how Mail.app is programmed to interact with Quicktime. If Quicktime is never called, it's a programming issue with Mail.app.


- router firmware issue: There is no way that an infrastructure element such as router firmware can cause an appication to grow in it's memory foot print. If Mail.app cannot handle how the network layer is functioning or even if a network outage caused it's memory footprint to grow, it is a software issue. Mail.app needs to be able to gracefully handle issues that are outside of it's control. If it can't, it's a code issue with Mail.app.


Let me throw in another posibility:


- Let's say that Mail.app is having some kind of protocol level conversation issue with Exchange. It is highly possible that it could be an Exchange issue. But if it was, it would be highly likely that more if not all Mail.app users that use Exchange would be having this issue. If Mail.app isn't properly communicating with Exchange on it's protocol, then it's a Mail.app code issue.


The bottom line is, this is an issue on how the application hanldes the memory it needs to use. If there is some external variable that is causing Mail.app to blow up memory, then it is a code issue with Mail.app because it doesn't know how to handle the external variable properly.


You are assuming that this issue is not happening on an older and/or lesser machine. I know a number of people that have a myriad of different MBP's (old/new, 2GB RAM through 8GB RAM) that all have this issue. Again, just because YOU aren't seeing any issue, doesn't mean it doesn't exist.

Nov 11, 2011 10:04 AM in response to a brody

The recent Apple firmware update fixed the problem of the Mail.app memory leak. Before the firmware update the Mail.app was using most of the DRAM and increasing amounts of virtual memory until it maxed out and crashed. After the firmware update the Mail.app is using a minimal amount of DRAM and very little virtual memory.


It was an Apple problem and Apple fixed it.

Mar 7, 2012 7:21 AM in response to josephoconnor

I have the same problem here...

Im using a Macbook i5 with the latest firmware version 10.7.3 which I bought a couple of weeks ago.

At first (with the 4gb RAM), I have no problem with it. I can browse easily... click this... chick that... no problem at all. BUT not after I set up my email using the Mail.app. Everything was freezing once I open that thing. I got this free apps called free memory which shows that I only got less than "10MB Free" once the email app is open.


I really thought it was the memory so what I did was I upgraded it to 8GB but the problem is still there.


Imagine if I dont use the mail app, I got 4.87 GB Free but if I open it, it will go down to 48MB...12MB...8MB...10MB...then 8MB again...


So I think theres really something wrong with the mail.app that Apple must fix the soonest possible.


Cheers!

Mar 8, 2012 5:59 AM in response to Halik

Ok, I too am having this problem, I have Macbook unibody, early 2010, running Lion 10.7.3, Mail Version 5.2 (1257)


Basically Mail has a massive memory leak and it is only because of the view options. If i view my emails as conversations, it comes up with the spinning gear and says 'loading', this then activates the memory leak and goes wildly out of control... my workaround has been to 'force quit' Mail, and then re-open it and uncheck 'Organise by conversation'. Memory leak resolved!


Unfortunately, viewing emails by conversation is no longer a feature for me:( Apple please sort this out!


Hope this helps people.

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.

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