Alllriighhty Then..
Earlier today I made a short post after which @kev@fosstodon.org attempted to follow the feed for my blog at https://journalctl.uk/feed/ at the same time or shortly near it my WordPress instance coincidentally decided to ‘fall over’ (aka die).
I attempted several time to reboot and the same issue kept happening – the journal showed that MySQL was being killed due to being out of memory (“oom-kill”)
I then spent a couple or 3 hours hours troubleshooting the issue.
I hope that now the problem has now been resolved.
The steps I took were to edit /etx/mysql/my.cnf and add the following to the bottom of the file
[mysqld]
performance_schema = 0
max_connections = 100
I then also set up a swap file on my VPS with the following as root (change the 1024 to your required size in mb)
mkdir /swap
dd if=/dev/zero of=/swap/swapfile bs=1M count=1024
mkswap /swap/swapfile
chmod 600 /swap/swapfile
Then add the swap file to /etc/fstab as follows
/swap/swapfile swap swap defaults 0 0
and activate the swap file with
swapon -a
Confirm the swapfile is recognised with
swapon -s
My WordPress Instance is still running for over an hour without incident.
I will of course post back If there is a re-occurrence