That's odd :/ . One of my wallet is hosted on 512 MB VPS. I guess there aren't many server resources to compile again.
Do you have a swap file? Usually that will do the trick for the smaller vps.
I deployed a 2 GB VPS and compiled the wallet there and copied litedoged and uploaded to the smaller VPS. It didn't work and I used rsync to copy the files from the 2 GB VPS to 512 MB VPS.
Thereby, it works fine.
Cheers
Salmen