Did you try adding a swap partition? I'm using the ghost image from digital ocean on a 5$ instance and even when I set it up manually before I didn't have the problem you described.
I didn't, but I'm not sure my constitution will withstand setting up a swap partition for a system that could be replaced by make and a trivial HTTP server.