so I have a few WordPress sites installed on my LAMP Ubuntu server. The past couple of days things have been extremely slow.. I am able to login to the wp-admin of my websites but from there any request (e.g. themes or new post) is followed by a 46 second wait time and then the error "Can’t select database" If I go to another one of my websites I get the same thing..
I can log into the back-end so I know it isn't my password that is causing this.. My server says mysql is running as well..
If I try and go back to one of these sites after that error above I get another error "Error establishing a database connection" Which is resolved by running
service mysql restart
However once I do this the cycle restarts.. Slow load time, "Can’t select database", mysql restart, and so on..
Any help would be greatly appreciated. Thank you in advance!
UPDATE: Rather than run service mysql restart. If I wait about 5 minutes after receiving either error everything seems to be up again (until I try and go somewhere in wp-admin then it crashes again.)