All applications got paused after disk space usage got near 99% and back to normal. What's next?

Mac does some pretty fancy background stuff to try and keep enough disk space for whatever it needs. In my case, 512 gb ssd, it needs to have at least 20gb free to run smoothly, so I usually have 40. If it goes less than 1gb for whatever reason (and boy, it isn't that hard to happen), all apps get suddenly paused without a warning and even if I immediately free up space, all apps get into a weird paused state for ever. This is the second time it happened (because I keep on constant manual monitoring with CMD + F3) and first time I gave up on finding a simple and good resolution (the first time it ended up rebooting after some update after some days, and I even forgot I hadn't gave up on improving this question, among so many others)

Force Quit Applications (FQA) window

So, one simple solution is rebooting. But then you can lose whatever you were working on. No good.

Another better solution is going to terminal and typing killall -CONT -c "app name" for each app and service. Nothing simple here and good luck finding them all with ps, activity monitor, Force Quit Applications (FQA) window list or whatever. Even if you do find 'em, this can't take less than a couple minutes for most heavy users.

Also, for whatever reason, some apps will continue to be listed as paused (on the FQA window) even if they seem to be running fine. Continuing the "odd enough" route of what status is this, there's a GUI'ed app for pausing and unpausing apps that won't even see them as being paused. Even if you go ahead and pause them to later unpause, they never get back.

Finally, I was looking for ways to write a script which would find the paused apps and kill -CONT them back again, but couldn't get such list in any way. launchctl or ps won't bring the "paused" or sometimes "not responding"-but-still-paused status.

I do remember unfortunately closing a window that did show up when the applications were first paused by the system which was very similar to the FQA window and did bring an extra button to unpause apps, but now I've got no clue what was its name or how to find it / trigger it again.

That's all I've got right now, and I'm almost giving up for good on this. Maybe the only good and simple solution is mixing up what I've got:

Unpause the important apps, save stuff and reboot.

Any better idea?


Solution 1:

To un-pause those paused/not responding applications after you free up some space, try to run this command:

pkill -CONT -u $UID

or (as suggested here):

kill -CONT -1

If this happens very often, consider adding the following alias into your shell rc file, e.g.:

alias unpause="pkill -CONT -u $UID"