- Releases of Whonix-Gateway XFCE prior build version
22.214.171.124.9: Virtual (VM) RAM increase to
1280MB RAM advised. 
Otherwise APT upgrades might freeze during module building (VirtualBox guest additions) as well as kernel header package upgrade. 
To change RAM setting:
- Power off the virtual machine.
- Open VirtualBox.
- Go to VirtualBox machine settings → System → Base Memory → Increase RAM by moving the slider or type
- Ignore message about invalid graphics controller VMSVGA because, see this.
- Click OK.
- Power on the virtual machine again.
- Whonix-Workstation XFCE: Already comes with sufficient RAM by default. No changes required.
126.96.36.199.9and above already comes with sufficient RAM by default. No changes required.
- Whonix CLI: Unaffected. No changes required.
- Whonix KVM: Unaffected. No changes required.
1280 MB RAM is sufficient. Using more would be OK too. Such as 2048 MB RAM would be ideal since then no swap file would be created.
 These are the trigger but not the root cause of this bug. The root cause might be a kernel bug where system becomes unresponsive when swapping that only occurs in VirtualBox that probably will not be fixed soon.
Related and further technical background: