The Sun BabelFish Blog
Don't panic !
My Mail.app is unstable
Mail.app is getting to be a real pain to work with. This is the 4th time in 2 months that I have to spend over 4 hours debugging it. As of writing this I can longer send or receive mail!
It used to just crash, which was useful because I could use dtrace to find all the files it had opened and just remove the directories in Library/Mail where it had last looked at. I could then re-import those folders later.
Since the 10.5.3 update it no longer crashes. A week ago it just either spent a huge amount of time thinking, using up over 100% of the cpu (there are two cores so it can use up to %200), and then finally recovered, but I had time to study a few chapters of "Semantic Web for the Working Ontologist before that happened. Today it just consumed so much cpu that all other applications became irresponsive. I reniced Mail with
$ sudo renice -20 -p 16410 #where 16410 was the process id of Mail.app at the timewhich made it possible to use my shell at least. Then it crashed.
I am clearly not the only one with this problem. Searching the web I found that
- Tim Bray twittered about a problem he had, though on asking him, it had a different solution, relating to removing ical entries.
- A long thread on the Apple support forum entitled "Mail Hangs". I am pretty sure none of the suggested solutions did anything for me. I spent last Saturday cleaning up my OS with OnyX (got it from somewhere else though)
- Another thread on the apple discussion forum entitled "Mail.app not restoring properly - keeps asking to import mailboxes, crashes".
- Search for "crashing mail.app" on Google limited to the last week or month, to get a feel for this.
Mail.app is really a key application of OSX. If Apple can't get this right, or don't have enough resources to dedicate to this, would it perhaps help to Open Source Mail.app? At least some of us could hunt down the problem and give them a fix. Currently I am not sure what they are doing about this. I will try once more to fix it, but I am really really close to switching to something else...
2 hours later - Solved: I had a mail folder for an internal Sun apple mailing list. I had suspected that there was a problem here as it would crash when I opened that folder. So I went to /Users/hjs/Library/Mail/IMAP-hsXXXXX@mail.sun.net and moved the apple.imapbox to a temporary folder. I then started Mail and it fetched all the threads from the server again. Having the mail on a remote server helps a lot. For one it should make moving to another client a lot easier...
Could it be that I have too many e-mails? The following seems to suggest that I have 273 thousand.
I have one gmail account, my personal imap server and sun work imap server if that helps...
hjs@bblfish:0$ cd Library/Mail
hjs@bblfish:0$ find . -name "*.emlx" | wc
273761 322242 17719867
Updates
It is 27 August now, and I have not had any serious crashes anymore. It could be that the last time I really cleaned up those broken folders. It could be luck...
Posted at 03:36PM Jun 18, 2008 [permalink/trackback] by Henry Story in General | Comments[3]
Note on comments:
- I know the forms below are a little small. We have asked for years for this to be changed, but I don't think it's going to happen soon. In Apple's Safari you can resize the entry box with you mouse. For people using other browsers click on this javascript link, that should allow you to resize your form.
- Comments are moderated, so they will take a little time to appear. Currently moderation means I have to read them personally. Hopefully with OpenId deployment, this will become more automated.
- HTML markup no longer works here, due to some decision made somewhere. Sorry about that.
- If you are having trouble posting, it may be that you need javascript to be enabled. I don't think javascript should be needed for submitting a form, but that's the way it is here.
- Check your comments by using the preview button...

Hi I have exactly the same problem - just started this week. Mail.app syncs with Gmail IMAP once on startup, but never again.
Thankfully Thunderbird3 is coming soon!
Posted by Ed on June 21, 2008 at 09:41 AM CEST #
Unfortunately, i have to agree. I am working daily with Mail, and it constantly keeps crashing several times per day (i am using POP+SMTP, not IMAP).
The application is nice, however - Apple - please work on this.
I personally have the feeling that on OSX 10.4 and 10.5.1 it was okay and seems to be more unstable in the newer OSX builds.
Posted by Frank on July 09, 2008 at 02:37 PM CEST #
exactly the same problem
i had it in the past with tiger but do not really remember how i fixed it :(
now it's horrible, every time (EVERYTIME !) I answer a mail or create a new one and start to compose, it hangs 1 second, write fast what I wrote for this second, and the crash... but in fact it's true it is NOT crashed, but hang, and to be honest not hang but working and using full CPU....
Last time on tiger i tried to let it works 12 hours and it was after that solved I think, but now I'm tired of that...
By the way, I'm 99% sure it's a problem with spotlight and mdworker, because I have mail and mdwork crashs logs together...
I'm really tired of that because I use Mail always, 100% my mac is on, and my mac is on several hours a day (2 to 18)...
could we open a website for it ? :)
Posted by iSéb on July 16, 2008 at 11:02 PM CEST #