I’ve recently setup and deployed two standard WordPress installations using Google Cloud Compute VM Instance.
The issue that I am having is that when the site is idle for a few hours or a couple of days, there is an error establishing a connection to the database.
If I reset the server, everything works fine.
I’m the furthest thing away from being an expert on Cloud based servers, any advice would be greatly appreciated!
I also posted this question in the Google GCE Group.
https://groups.google.com/forum/#!topic/gce-discussion/8knQumfLsBY
Credit to George from Google Support, the fix was rather simple.
You will oly be able to run the command as root. So
sudo su
to switch to root.This solution is a confirmed fix to my problem, hope it helps someone else.