Q: 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...
MacBook Pro with Retina display, OS X El Capitan (10.11), stock machine, no add-ons.
Posted on Oct 2, 2015 5:41 AM
Back up all data before proceeding.
Step 1
If Mail crashes or freezes immediately on launch, try the steps suggested on this page. Sometimes a corrupt message on a mail server can be deleted by logging in to the server through its web page. If Mail still won't launch, skip to Step 3.
Step 2
There are three types of mail account: IMAP, Exchange, and POP. You can determine the type of each account by opening the Mail preferences window, selecting the Accounts tab, and then selecting Account Information.
Select all POP mailboxes, if any, and then select
Mailbox ▹ Export Mailbox...
from the Mail menu bar. Export the POP mailboxes to the Desktop folder.
If you have IMAP or Exchange accounts, and you don't store sent, deleted, and junk messages on the server, export those mailboxes the same way. You can determine whether the messages are on the server by selecting Mailbox Behaviors in the Accounts tab.
Also export all mailboxes in the On My Mac category.
You don't have to export the other mailboxes, because the messages are stored on the servers.
Quit Mail.
Step 3
In System Preferences, open Internet Accounts (OS X 10.9 or later) or Mail, Contacts & Calendars (OS X 10.7 or 10.8). Make notes of the settings for each mail account (all types), then delete the accounts.
Step 4
In the Finder, hold down the option key and select
Go ▹ Library
from the menu bar. Move the following items (some may not exist) from the folder that opens to the Desktop:
Application Support/AddressBook/MailRecents-v4.abcdmr
Containers/com.apple.corerecents.recentsd
Containers/com.apple.mail
Containers/com.apple.MailServiceAgent
Containers/com.apple.share.Mail.compose
Note: you are not moving the Mail application. You’re moving a folder named “Mail.”
Step 5
Launch Mail. It will behave as if you were setting it up for the first time. Go through the setup process with one account, using the information from Step 3. Test. If Mail works now, recreate the rest of the accounts (if you have more than one) and other settings.
Any custom stationery that you created may be lost. Ask for instructions if you want to preserve that data.
If there’s no improvement, quit Mail and put back the items you moved to the Desktop, replacing any newer ones that may have been created in their place. Stop here and post your results.
Step 6
If you took Step 2, import the mailboxes you exported:
File ▹ Import Mailbox...
Select Apple Mail as the data type. Typically, the process takes a few minutes, but it may take hours if you have gigantic mailboxes. In that case, you may be able to speed things up by temporarily adding your home folder to the Privacy list in the Spotlight preference pane. Remove it when Mail has finished importing.
The mailboxes that you didn't export in Step 1 should synchronize automatically with the server. Again, if the mailboxes are very large, downloading them may take quite some time, and network performance will be slower than usual during that time.
If you skipped Step 2, look inside the Mail folder on the Desktop for a subfolder Mail/V2/Mailboxes. Import the mailboxes it contains.
Test. If Mail is still working, delete the items you moved to the Desktop in Step 4.
Posted on Oct 3, 2015 9:48 AM



