google-cloud-platformvirtual-machine

Down-sized machine type on Google Cloud VM instance - now the machine goes down every now and then


I am running a virtual machine with Wordpress and MySQL and it has worked well.

To save some cost I down-sized the machine type to e2-micro. Since then the connection to the vm goes down every now and then. Neither accessible by browser nor SSH through Google Console.

The vm needs to be reset/restarted to get it up again.

Is it something with that specific machine type making it go to sleep and how would I go about to avoid that?

Screenshot of the vm configuration


Solution

  • Down-sizing your machine type is not recommended as e2-micro is very constrained for a Wordpress + MySQL workload. As mentioned by @dany L, you may use cloud monitoring to check and set up alerts for high CPU and memory usage. As another option, you can enable the "Automatic Restart" configuration settings to help the VM recover automatically if services crashed.