Stuck in a loop of freeing up space and filling it up again when rebuilding

How did that happen?

From my side, I can say that I started an update via /admin/upgrade which failed, presumably due to a lack of space. Since the website was down, I tried to rebuild via ssh and that’s when the whole misery started…

Regardless of this specific situation, I wonder if the web-updater could not handle lack of disk space better. Rather than crashing the site, could it not just exit before it’s too late?