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

Memory Leak with Mail.app

Ok, I am having a remarkable amount of trouble with mail.app these days and I am completely unable to explain it. Currently, I am having this problem with my 2ghz Macbook AND my 2.3ghz Mac Pro...both are running 10.5.6 and the Macbook has 2gb of RAM, the Mac Pro has 6gb.

Recently (within the last 3 weeks), everytime mail.app is open, it quickly steals a lot of CPU and an increasing amount of RAM until it crashes (gets to ~1.5gb on the macbook, ~3gb on the Mac Pro). I have two accounts, my MobileMe account and an Imap account...when I either remove the MobileMe account or disable it from the preferences, the app runs fine...no memory hogging or anything. I've tried deleting the preferences, removing feeds, rebuilding the mailboxes, reinstalling mail.app from my installation dvd (all based on research on these forums and elsewhere) and nothing fixes it. If I do any of these, the app will open fine the first time, but upon quitting and restarting it, will again hog all memory until it crashes. This is infuriating.

So it happens on both of my machines...exact same thing, with the problem fixing itself if I get rid of the MobileMe account. To me, this seems like a server issue, but I am unable to find anyone that has a similar issue. Any help would be appreciated...I can post crash logs, if necessary.

Mac Pro, Macbook, Macbook, iPhone, Mac OS X (10.5.6)

Posted on May 11, 2009 8:12 PM

Reply
19 replies

Jun 8, 2009 12:32 PM in response to James Haley

I've been having very similar problems. The build I'm using is Version 3.6 (935/935.3). Ever since my upgrade to Leopard I've not found Mail.app to be very reliable, but I thought I had things mostly working smoothly until the past few weeks. Mail hangs on a frequent basis now, constantly displaying messages in the Activity Monitor like "Synchronizing with server" or "Synchronizing INBOX/OUTBOX/Apple". It's asking me for account passwords. I've tried leaving it alone overnight with the hope that it would finish whatever it's trying to do, but that doesn't seem to help. "Quit" is often greyed out on the File menu soon after the app starts. When the machine begins to thrash the only way to repair it is to Force Quit Mail.app, which quiets it down right away but doesn't seem to solve Mail's problems. The one factor I can posit is that I do have a few thousand emails on the server, but given Mail's former reliability and the fact that I compacted the box recently (long after the problems began) I don't think the volume of the account is the problem.

Jul 21, 2009 7:26 AM in response to James Haley

Nope, I think this is the thread. It may be a java issue. Mail.app worked fine for me until I installed the 10.4 u4 Java update. A few hours later I had my first Mail.app crash. I've rebooted and such and thought about trying to back out the Java update. I'm using the new Thunderbird in the interim and I my get used to it if a fix isn't released soon 😉.

Jul 29, 2009 3:44 AM in response to James Haley

I'm having the same problem as J.H. with a similar MacBook, and have tried the same fixes, with the same (lack of) results -- except, for me, disabling the IMAP MobileMe account in Mail did not fix the problem. I have had to startup the Mail program each time I want to check my email, and then quit it -- or, within 15 minutes, it will freeze or crash -- but not before revving up the MacBook's fan.

I am amazed that a problem such as this could be unresolved after two months... doesn't anyone from Apple read their Support Discussions?

Jul 29, 2009 3:28 PM in response to Nicholas Ballard

Nicholas Ballard wrote:


Hi, and welcome to the forums.

As previously posted, you'll probably do better in the Mail forum.

I am amazed that a problem such as this could be unresolved after two months... doesn't anyone from Apple read their Support Discussions?


No. As mentioned in the Help & Terms of use (link at the right), these are user-to-user discussions; Apple techs do not monitor them.

If you have a problem, contact AppleCare, make an appointment at the Genius Bar of your local Apple Store, or search, browse, or re-post in the Mail forum.

If you have a complaint or suggestion, post here: http://www.apple.com/feedback/

Aug 16, 2009 7:56 PM in response to Nicholas Ballard

Sorry, but that does not solve the problem. I have the exact same thing that started a week ago. All of a sudden my mail app starts eating all ram and once it is up it crashes. Again if I take my .mac account offline the problem is solved.
Funny enough same thing starts happening on my other macs once I start mail.
I have tried the advice I got from the Apple Experts on their support line which was resetting sync data on my mac.com account.
I found an old mac where I hadn't run mail in a while and it worked last time. I synced as per the instructions to my online mac.com account (mobile me same thing) and lo and behold same results.
I am at a loss since accessing online or via iphone works fine!

I now have a genius appointment since the apple support I talked to made me reinstall my system without any effect what so ever...

Aug 17, 2009 4:57 AM in response to Peter Hjelm

On my system, resetting the Sync Data in the MobileMe Preferences panel did NOT solve my problem either -- what I had to do was to open the iSync Application (located in the Applications folder), then open its Preferences panel, and then click on the Reset Sync History button. Therefore, if you have not done so, try doing the reset through the iSync Application...

Mar 13, 2010 8:15 PM in response to Ronmeister

I tried both the iSync reset and the safe boot - neither helped.

So I decided to see what files were being accessed/created while the Mail.app memory was growing. I used the program "fseventer" which provides a list/map or all files which are opened or closed (and a bunch more). There were a bunch of scratch files created in /var/tmp, but there were two files that kept getting opened and closed over and over:

(my homedirectory)->Library->Mail->AvailableFeeds
and
(my homedirectory)->Library->Mail->AvailableFeeds-journal

I quit Mail, went to that Mail directory, and renamed those two files by prepending an "X" to their names (I could have just dragged them to the trash). When I restarted Mail (without rebooting or doing anything with iSync or the Sync preference panel), it recreated the AvailableFeeds file, but did not go into the loop that had previously caused it to run out of memory. Mail is sitting at about 65MB for me at this moment.

So, if you see the Mail application growing in size until it aborts, it appears that the most direct fix is to quit Mail and delete the ~/Library/Mail/AvailableFeeds and ~/Library/Mail/AvailableFeeds-journal files. No reboots or other actions are required.

I hope this helps somebody - this was pretty frustrating for me.

Apr 16, 2010 7:50 PM in response to jimglidewell

Yeah, I've been having this runaway leak problem with mail intermittently for about the last six months. It seems to surface about every couple of weeks, persists for a day or two and then mysteriously goes away. Now, considering that I am trying lots of fixes, it is easy to fool yourself into thinking that the problem went away because of something you did, i.e. safe boot, etc. So I am reading these "fixes" everyone posts rather skeptically. (Though, if they have worked for you and permanently resolved your trouble, then good for you). But, NONE of them have worked for me.

I ran fseventer, (cool utility, by the way) but did not see the same suspicious behavior. Just the same, I tried hiding the AvailableFeeds files and restarted mail, memory leak still there. But that got me thinking... I took a look at my RSS feeds section while mail was open and realized, that I had about 30 feeds, some with a huge number of posts (many hundreds). So I DELETED all of those with >20 posts. Wasn't reading them anyway. Restarted mail.

Whoa!!! Problem apparently solved. But I've been fooled before. Still, this is the most immediate resolution I've experienced, so I will keep an eye out and see if the monster resurfaces.

If this doesn't work, I'm thinking maybe I need to burn some incense and find some other way to appease the memory gods. Hopefully it won't come to that.

- Leon Starr

Memory Leak with Mail.app

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