Mac 911: Safari consistently quits in Yosemite

A reader finds that Safari quits whenever he walks away from his Mac, and he can't figure out how to get this behavior to stop.

safari 8 yosemite

Today's Best Tech Deals

Picked by Macworld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

Andrew Chase finds that Safari quits whenever he walks away from his Mac, and it’s driving him to distraction.

Ater leaving my computer for a period of time, I come back and Safari has closed down. No error or crash report, its as if someone is playing a trick on me and closes Safari. I have tried rebooting, deleting preference files, and turning off sleep. Not allowing my computer to sleep seems to have reduce the frequency that it happens, but I can’t be sure of it.

In 10.7 Lion, Apple added an automatic background quit feature to OS X that’s designed to better free up system resources by software that’s not in use. It comes in two forms: automatic termination, which silently goes through the app’s normal quitting process when you’re not using it; and sudden termination, which kills off the app without any warning.

Both features require developers to add support, and Apple incorporated termination into many of its apps as an example to others. I notice that QuickTime Player, which I use to record audio from a mic, will quit sometimes almost immediately after I launch it if I navigate to another app before opening a new audio recording window! That’s probably a bit aggressive.

However, this automatic quitting is supposed to be paired with faster startup, so that from the standpoint of user, they’re not waiting for the app to launch again, but rather it seems a very brief pause before it’s available.

I suspect this is what’s happening with you and Safari, though it’s clearly more aggressive than you want. I would also suspect that you typically have many apps running or not enough memory available for the apps you routinely use. OS X is quitting Safari whenever it has the opportunity to avoid using disk-based memory swapping, which slows down the system.

If you dare use the command line via Terminal, you can disable this behavior system wide. Enter exactly the following:

defaults write -g NSDisableAutomaticTermination -bool yes

Apps with the feature need to be quit and relaunched. Swap yes for no if you want to re-enable this feature later.

Ask Mac 911

We’re always looking for problems to solve! Email yours to including screen captures as appropriate. Mac 911 cannot reply to email or publish answers to every question.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
Shop Tech Products at Amazon