epikeia

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

memory.jpgdisc.jpg

MacBook Pro with Retina display, OS X El Capitan (10.11), stock machine, no add-ons.

Posted on Oct 2, 2015 5:41 AM

Close

Q: 10.11, Mail.app Memory Leak?

  • All replies
  • Helpful answers

first Previous Page 4 of 6 last Next
  • by tvtimedirect,

    tvtimedirect tvtimedirect Oct 26, 2015 1:10 PM in response to tvtimedirect
    Level 1 (0 points)
    Oct 26, 2015 1:10 PM in response to tvtimedirect

    i want to let you know that i turned off my mail all weekend - I have not had the problem yet today.

    BUT - suddenly  i can't save to my documents folder and had to rebuild a bunch of stuff there

  • by Andersburn,

    Andersburn Andersburn Nov 2, 2015 10:15 AM in response to epikeia
    Level 1 (0 points)
    Nov 2, 2015 10:15 AM in response to epikeia

    It worked for me.

    But as always a new problem has come up

    i'm unable to add yahoo/google mail accounts do to this error: "Failed to verify the server certificate. This could be because of your network configuration or your proxy settings"

  • by JohnF01756,

    JohnF01756 JohnF01756 Nov 3, 2015 3:07 AM in response to miguel.apple
    Level 1 (10 points)
    Nov 3, 2015 3:07 AM in response to miguel.apple

    Hey

     

    Many thanks, this worked for me. All *.log files deleted (but I left the *.zip files)

     

    Many thanks again,

    JohnF

  • by jcw289,

    jcw289 jcw289 Nov 8, 2015 5:34 AM in response to miguel.apple
    Level 1 (0 points)
    Nov 8, 2015 5:34 AM in response to miguel.apple

    I had followed Linc's suggestion, and removed all mail accounts.  Incredibly, with NO active mail accounts, on launch Mail nonetheless rapidly hogged memory and was at 18Gb within 1 minute. With no active mail accounts and no emails.  Deleting the log folder, as suggested by Miguel and Luigino, worked for me.  Mail launched and held steady at ~34Mb with no active mail accounts and no emails then slowly grew as I added mail accounts and emails were downloaded. After adding 3 accounts and allowing time for folders to sync, memory use ~= 260Mb.  No runaway memory leak.  Yay!

    Many thanks for the help!

  • by Leperous,

    Leperous Leperous Nov 9, 2015 12:15 PM in response to miguel.apple
    Level 1 (0 points)
    Nov 9, 2015 12:15 PM in response to miguel.apple

    Your solution is the REAL solution to this problem, not the incredibly over-complicated one marked as the thread's official solution -- yours doesn't require that I delete all my data, for one thing.   

     

    Thanks much for your help.

  • by Lorkedien,

    Lorkedien Lorkedien Nov 11, 2015 9:47 AM in response to epikeia
    Level 1 (0 points)
    Nov 11, 2015 9:47 AM in response to epikeia

    I have finally solved my issues with El Capitan Mail app and (in my case) Exchange Servers.

    This is what I have discovered;

     

    The problem:

    Mail app at El Capitan create massive debug logs at ~/Library/Containers/com.apple.mail/Data/Library/Logs/Mail/

    The debug log it's not running all the time, only sometimes start a crazy loop, that you can't stop anyway, it's doesn't matter if you close the app, because it will continue next time you open Mail.

    When the issue it's happening the Mail app processor use it's over 100% and the file XXX_IMAPSyncActivity.log starts to grow up to the infinite.

    When the file it's too big, Mail tries to archive and zip the file, and this eats all your ram memory.

    At this time you computer it's completely lost, and your only option it's to force kill Mail app or a hard reset.

    If you open Mail again the process will remain at the last point and you will lose your computer again.

    At this time you can remove all log and zip files at ~/Library/Containers/com.apple.mail/Data/Library/Logs/Mail/ restarting the process from the beginning.

    It doesn't matter if you activate, deactivate, delete, reconfigure, rebuild or whatever you want to do with the conflictive account.

    it doesn't matter if you do a clean install of El Capitan and start from zero.

    Soon or later the log will eat all your resources, your processor, your disk and your ram and you will lost your computer control again.

     

    My solution:

    Probably you need to uncheck first:

    Mail --> preferences --> accounts --> Mailbox Behaviors --> Move deleted messages to the Trash mailbox

    And after that, disable:

    Mail --> preferences --> accounts --> Advanced --> Compact mailboxes automatically

     

    I have seen that when Mail tries to compact the mailbox with Exchange Servers the process doesn't work as expected and loops an indefinitely error.

    The debug and log of this error it's what in my case created all my problems with Mail.

    Disabling the automatic compact mailbox for my exchange account I have had no more issues with the Mail app at El Capitan.

     

    I hope this help others with the same problem, and Apple programmers to definitelly solve the problem in a next update.

  • by jcw289,

    jcw289 jcw289 Nov 11, 2015 9:59 AM in response to Lorkedien
    Level 1 (0 points)
    Nov 11, 2015 9:59 AM in response to Lorkedien

    @ Lorkedien

    Not sure this will work for all Exchange accounts.

    For example, with my exchange account I don't have this option: Mail --> preferences --> accounts --> Advanced --> Compact mailboxes automatically

    I only have it with IMAP accounts (and it's greyed out, checked and not optional).

  • by Lorkedien,

    Lorkedien Lorkedien Nov 12, 2015 1:35 AM in response to jcw289
    Level 1 (0 points)
    Nov 12, 2015 1:35 AM in response to jcw289

    Hi, our company Exchange Server it's very very old, (it's the unsupported 2003 version), and the only way I can use it on a mac is with IMAP, I don't think the problem it's with all IMAP configurations because I don't have any problems with other IMAP accounts (gmail for example) in my home computers.

     

    In my case, the compact option it's greyed out if I don't disable first Mail --> preferences --> accounts --> Mailbox Behaviors --> Move deleted messages to the Trash mailbox.

     

    If on "real" Exchange accounts (EWS log files) that option it's not present I would try to configure the account with IMAP and disable the move deleted messages to trash and compact mailboxes. It's not perfect, but I have been having the problem with Mail from the first day I updated to El Capitan, I tried all possible things, and suggested previous solutions, I made a clean install of El Capitan and configuration from zero, and nothing solved, until I unchecked the sent to trash, and after that the compact mailboxes. With that configuration I have had no more problems and my job iMac 24 2008 (with ssd) goes like my home mac book pro retina 2014, very very fast and without any problems

     

    This is the full configuration working for me:

    Captura de pantalla 2015-11-12 a las 10.33.12.png

     

    Captura de pantalla 2015-11-12 a las 10.33.32.png

  • by Chakdag,

    Chakdag Chakdag Nov 18, 2015 2:14 AM in response to JimRobertson
    Level 1 (10 points)
    Nov 18, 2015 2:14 AM in response to JimRobertson

    Hi everyone,

    Just an update. Have tried all solutions proposed here, combined or individually, and sadly the issue keeps coming back.

    Deleting the log files / and deleting-reinstalling the problematic account works but not for long and the problem shows again after a couple of minutes now (before was a couple of days).

    My problem is one precise IMAP account that keeps stacking log entries in my log file at a staggering speed and the log file ramps up to many GB in matters of minutes.

    If anyone has a clue that would be appreciated.

     

    Thanks

     

    Chak

  • by Lorkedien,

    Lorkedien Lorkedien Nov 18, 2015 3:13 AM in response to Chakdag
    Level 1 (0 points)
    Nov 18, 2015 3:13 AM in response to Chakdag

    Hi Chakdag, have you disabled

    Mail --> preferences --> accounts -->

    • Mailbox Behaviors --> Move deleted messages to the Trash mailbox

    and

    • Advanced --> Compact mailboxes automatically

    for the IMAP problematic account?

  • by Lorkedien,

    Lorkedien Lorkedien Nov 18, 2015 3:34 AM in response to Chakdag
    Level 1 (0 points)
    Nov 18, 2015 3:34 AM in response to Chakdag

    One more tip, if you open the activity monitor app probably you will see your cpu use very high due to the crazy log creation.

    Try to disable all Mailbox Behaviors checkboxes and play with the checkboxes at the advanced tab, when the problem is solved the processor inmediatelly goes to the normality.

    If nothing works try to disable the account, if this doesn't stop burning the processor that is not the problematic account, so try disabling the other accounts until your processor goes to normality.

    First of all, go to windows, inspector connexion and be sure the registry activity it's disabled, click on show registries, close Mail and remove all files from the opened folder in finder, because if Mail it's trying to zip the log the processor would be crazy too.

    If after all doesn't work try to open Terminal and type

    cd ~/Library/Containers/com.apple.mail/Data/Library/Logs/Mail/

    ls -la

    look at the problematic log file name and type something like this:

    tail -f 2015-11-18_IMAPSyncActivity.log

    you will see live the crazy log creation

    to stop the tail command press ctrl + c (not cmd)

    try to understand the error message it's being repeated constantly

    if you want you can share here the error message.


    I hope you have luck.


    Best


    Lork

  • by JerimiahJ,

    JerimiahJ JerimiahJ Nov 18, 2015 12:05 PM in response to epikeia
    Level 1 (0 points)
    Nov 18, 2015 12:05 PM in response to epikeia

    The solutions proposed in this thread seem to be from people more expert than I, but I have found an easy one that works for me to solve the mail memory leak that eats all RAM. 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.

  • by Chakdag,

    Chakdag Chakdag Nov 19, 2015 12:14 AM in response to Lorkedien
    Level 1 (10 points)
    Nov 19, 2015 12:14 AM in response to Lorkedien

    Hi Lork,

     

    Thanks for the guidance. I will try to reproduce the issue. At the moment it seems to be stable again, but I know it won't be for long.

    I am monitoring the log file with Console.

    As soon as I see the log file growing again I'll post the error message here.

     

    Thanks

     

    Chak

  • by sergikkio,

    sergikkio sergikkio Nov 19, 2015 10:13 AM in response to epikeia
    Level 1 (0 points)
    Nov 19, 2015 10:13 AM in response to epikeia

    I was affected by the same problem, but I found an extremely easiest solution:

     

    Go into your user Library, go into the Containers folder  and find the com.apple.mail folder and trash it!!!!

     

    restart mail and everything works fine again.

     

    enjoy

  • by jeffeckman,

    jeffeckman jeffeckman Nov 19, 2015 8:07 PM in response to sergikkio
    Level 1 (0 points)
    Nov 19, 2015 8:07 PM in response to sergikkio

    Thank you! Best answer! I removed that com.apple.mail folder as you suggested and no more memory leak (at least for the moment). I only had to reset up my prefs for the app, but that's a small price to pay for these great benefits:

     

    • Better battery life
    • Mail that actually works for more than 5 seconds
    • An OS that doesn't run out of memory in 60 seconds
    • MMMMMMmmmmm happy MacBook Pro....

     

    -JE

first Previous Page 4 of 6 last Next