4

For some reason, Mail takes significantly longer than most of my other apps to quit. It might become unresponsive for a period of time after I hit [command]+[q] before it actually quits. What is taking Mail so long to quit?

5
  • 1
    Turn off your network and repeat the experiment. What could it be?
    – bmike
    Mar 21, 2012 at 4:56
  • With the network off, mail still refuses to close, but it's much quicker.
    – Moshe
    Mar 21, 2012 at 4:59
  • You've now measured the time to finalize open files and clean up as well as the difference in time due to slow mail server / network responses. You could go a step further and test quitting mail on a new user account to know if your mailbox needs to be rebuilt or it's just the machine's speed. (i hope you don't mind fishing lessons)
    – bmike
    Mar 21, 2012 at 5:02
  • Lol, I don't mind the fishing lessons. I mind the barrage of downvotes I'm seeing today. :p
    – Moshe
    Mar 21, 2012 at 5:07
  • I think people are a little overwhelmed by the flood of very simple questions and also energized to vote for the contest. This grumpiness will pass - and you can always look to improve things. I think as a user with 2.5k or more, the bar is higher for what sort of question is worth an up vote - but everyone gets a vote even though it can sting to be down voted. Guessing questions where no troubleshooting steps are offered, no research is done to frame the questions are as a class getting the most down votes this week.
    – bmike
    Mar 21, 2012 at 5:11

2 Answers 2

0

Mail is like many apps that use the network - it can't just quit if there is network traffic active, it needs to see those requests safely terminated. If for example Mail is checking your iCloud account it needs to wait a certain time until all processes are complete before exiting. It may also be sending an email that you have just hit "Send" on, and then you have immediately tried to quit - can't work that way. Even if the network communication is asynchronous these things need to be tidied up before exiting.

5
  • Quitting the application terminates all network connections. Operating System is responsible for cleanup of network connections. Maybe not "safely", but checking remote email folders should not require any kind of "safe" termination. Only if it was sending the email I would accept the delay (or alert dialog). Mar 21, 2012 at 8:52
  • Obviously it terminates network connections but it does not do so instantaneously. (Mail.app developers eagerly await the full definition of what delays you would accept) Mar 21, 2012 at 19:40
  • My point is ... unless there is mail being sent, there is really no point in waiting for network connections when quitting the application. You write "it can't just quit if there is network traffic active, it needs to see those requests safely terminated" -- I just don't see why that would be the case. Mar 21, 2012 at 20:08
  • I think it strange that this was not the case for previous OS X releases? I had never experienced Apple Mail problems with closing and deleting emails before Yosemite. I'm sure this has much to do with interfacing to iCloud, but why doesn't anyone admit to that? Any user should not have to go through special accesses to the Library and remove folders, etc. to fix a bug that Apple created.
    – user115974
    Feb 24, 2015 at 14:56
  • I'm very much with @PeterŠtibraný as networks are inherently problematic. If a program is designed to never move on when certain network operations fail - what happens when packets are lost? You shouldn't have no time out and cause Mail to hang indefinitely after the user tells it to clean up and quit - that would be awful design.
    – bmike
    Feb 24, 2015 at 15:17
4

Turn on the Activity window to see what's going on. You probably have it set to purge deleted emails or some other shutdown maintenance. Press command-option-0 (command-0 if you're not on Lion 10.7) to see it or select from the Window menu.

I keep the Activity window up all the time just to see what's going on. But then, I have to monitor about 30 different email accounts for various work-related reasons.

1
  • Even this is proving fruitless on the most recent redesign of Mail.app. It uses XPC and interprocess messaging that can and will get wedged. I've submitted several bug reports to Apple showing how mail can hang forever, not showing as "non-responsive" in the force quit dialog. Not ever quitting, not ever processing any more mail that is incoming. Just totally blocked waiting for a network response that will never arrive. Force quit is the only out in these cases.
    – bmike
    Feb 24, 2015 at 15:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .