Have you checked which program / package is consuming RAM?
I can't ssh in and view anything it's basically frozen when it happens
You should enable a log to monitor RAM consumption
I would also install zram to handle slight RAM overcommit on virtual nachine better.