By mosaic
Hi, some of our droplets (running wordpress) are experiencing the dreaded: “error establishing a database connection”
It’s happening too much for my liking and we are considering a moving away from DO if we can’t resolve it soon.
I am trying to learn SSH commands for logging in and controlling / managing a server.
The droplets are Wordpress sites running on Ubuntu.
I understand how to login, but i am sure there are a lot of useful commands i need to learn such as restarting the server etc.
I would greatly appreciate any help you have on this, and any commands which you think would be useful based on the above setup (Ubunto / Wordpress)
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!
Why would it make you move away from DO? You’ll run into it with any VPS no matter where. Check your syslog for OOM killer on mysqld. If it’s there, upgrade your droplet or use less RAM.
@mosaic - Errors are not specific to DigitalOcean and could pop up for any number of reasons on any VPS deployed to any provider and at any time if the software, MySQL in this case, is not tweaked and / or tuned properly. You could “downgrade” to shared hosting, though you would, as a result, lose the ability to customize your server and would thus be stuck with whatever configuration the shared host sets.
The specific connection error that you’re referencing could be due to poor configuration (such as RAM being over-allocated), lack of configuration or problems elsewhere. To really dive deep in to the error and the configuration, MySQL Tuner should be used (as I referenced in another post of yours IIRC). It will allow you to see how much RAM could potentially be used by MySQL (note: if MySQL is configured to use more RAM than the Droplet is allocated and swap won’t cover the excess, MySQL is going to crash as MySQL will use whatever it’s allocated).
That said, there’s not a specific one-shot variable that tells MySQL how much RAM it can use (when compared to MemCached or Redis, which has one configuration variable for RAM allocation). MySQL uses a combination of InnoDB settings as well as buffers, query cache etc to allocate RAM. If these are set too high, MySQL will naturally crash as a result of lack of RAM/Memory.
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.