A Word On Site Stability

Since the server move, from AWS to Google, I had noticed that every now and then, you’d be greeted with a database has gone away type message, requiring a restart of MySQL. This has been bugging me a little and turns out it was a pretty simple fix (that better not be famous last words!) to implement. Thing is, the free servers on Google Cloud are not particularly well specced (funny that). They have about a gig of usable memory and CPU’s that share their load amongst other servers. It’s fine for a small blog with low traffic, such as this. You wouldn’t want to run something that requires numerous threads/users and all sorts going on.

Anyhoo, I realised the server was probably running out of memory, causing the MySQL Server to crash. Whilst upgrading the server, adding more memory is an option, that would take it out of the free tier. To keep things cheap, I am using the hard drive as usable memory; setting up a 1GB swap file which the server can access. Slower than RAM but should fix the crashes.