Forum archive
Wordpress Crashing - Error establishing a database connection
Hello,
I am not a very experienced Wordpress Admin, this is my first Site. I would like to ask for some help from you.I have a Workpress Appliance running for 2 years in Amazon AWS. It worked fine since initial install without any downtime. I did regular upgrades until I start to have problems.
On last months I have experienced repetitive downtimes with the message:
Error establishing a database connection
Its necessary to reboot the AWS Instance to execute the procedures to recover the Database, using:
I seems to be ok, the script runs fine but and the site crashes after some hours.
Looking in various support sites I found that this kind of problem should be simple to solve with the repair.php procedure, but unfortunatelly it doesn´t seems to be my case.
Questions for help:
Does anyone could recommed a more eficient procedure to recover from this problem ?
Is it possible to reinstall the Turnkey Wordpress Appliance like the initial setup ?
Thanks in advance.
Rogério Guimarães
You'll need to do some monitoring to see if that's your issue, but I think the odds are pretty good. Especially if a reboot resolves it (for a little while).
Assuming that's the issue, to properly solve it, you either need to give your server more RAM, or reduce the amount of RAM it's using.
For an older appliance running on Amazon, the first thing I would recommend is using TKLBAM to migrate your data to a new v14.1 HVM instance of the relevant size. E.g. t1.micro to t2.micro; m1.small to t2.small, etc. The newer HVM instances sizes give much better performance per price compared to the old PV instance sizes. There is a doc page here which provides a suggested workflow and some specific considerations when migrating data.
The performance increase may be enough to get your server running more reliably? If not, then you have a few other options to explore. Each one of these should help but there's no reason why you couldn't do a number of them (or even all of them):