"Your system has run out of application memory." How is that possible?
In my experience, this occurs when my main system hard drive is running low on free space. Operating Systems use the hard drive for extra memory storage, called "virtual memory". (I've definitely always wished that the OS could just reserve enough space for itself, but it just can't predict how many applications we'll be running).
On top of that, it's worth noting that regular web use now requires far more memory than it did in the past. In activity monitor, you'll notice that every single tab & window (every open web page) is it's own process, taking up a significant chunk of memory. On top of that, account for all the ads, movies, flash, scripts, plugins and 360 videos etc. that we expect to run smoothly. New OS's and new web pages just use a lot of memory to provide us with the services we expect to "just work" (eg. syncing across devices, notifications, automatic updating etc. etc.).
In short, in my experience there usually isn't a single process that's suddenly taking up a huge amount of memory (although a leaky program could indeed be a culprit - Sketchup 2016 does this to me, for example). More commonly, it's the additional functionality we expect of many programs/web plugins.
I believe restarting the computer always alleviates this problem for a short while - primarily by unloading all the webpages and apps we had launched over time. But if our expectation of the computer and hardware constraints stay the same (and we run the same number of processes without changing anything else), eventually we'll run into the problem again.
Two solutions that work for me:
1) Open fewer tabs/pages and fewer programs at one time. Close some web-pages/programs before opening the hefty apps, such as MS Office, Parallels, 3D CAD, Adobe programs etc.
2) Free up more space on the system hard drive (eg. move all your music and photos to another drive), to allow the system to handle your typical virtual memory needs. For me, this means my 1TB OS drive needs >20% free space (200GB)! Your requirements may be different. If you're on an older Apple laptop or iMac or Mini, the OWC Data-Doubler is a really fantastic way to accomplish this.
Method (1) is my temporary fix, so that when I eventually enact method (2) I will have restored the snappy performance I expect while running many heavy-duty programs simultaneously.
Could be a Google Chrome application memory leak as I had the same issue with it. Run Task Manager (in More Tools menu or got to chrome://system/) and check memory used by opened tabs and kill them. If won't help, Force Quitting the affected application should solve the problem.
Alternatively check your memory pressure (memory_pressure
command) and double check your free space so there is enough storage for swap files. Also try running sudo purge
from the Terminal.
More likely it is a problem with the OS itself. I just received this message when I had just a few programs open and memory pressure was "green" in Activity Monitor - but my uptime is 106 days. As everyone know - no computer/OS can run forever without a restart although 106 days is not a high number if you compare with mainframes, but for a personal system it is pretty good (albeit my second Mac's uptime is 168 days as we speak - with no signs of running out of memory). Restart is probably the best suggestion until Apple fixes this.