I had faced the “Error establishing a Database connection” error suddenly while uploading images to the website (may be due to out of memory). I tried following the article “https://www.digitalocean.com/community/tutorials/how-to-debug-the-wordpress-error-establishing-database-connection”. Accordin to the steps given, I added “define(‘WP_ALLOW_REPAIR’, true);” in my wp-config.php file. But I am not getting the repair screen. Instead it says “This page isn’t working xyz.com is currently unable to handle this request. HTTP ERROR 500”.
Please help.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Since you are seeing a 500 error you may want to check your webserver logs to see the full 500 error being reported. In a lot of cases the webserver is failing to respond and that error can give you more details on the cause. You may also want to try restarting your webserver.
For the database error, a lot of times it is caused by running out of memory, so checking your mysql logs will indicate OOM errors and verify if that is the case.
Hi NJW, thank you for your prompt reply. Appreciated! However, I tried checking mysql logs it says, “2017-04-11T17:38:22.604644Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool”.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.