By Salvatore
Hi,
I am using a WordPress droplet for this website: Trovalost.it
but when I try to do some MySQL-intensive activities (i.e editing more than a post, or fixing links in web pages) sometimes MySQL goes offline. I looked in /var/log/mysql/error.log but it looks empty, so no idea about what problem I need to solve.
Looked inside /etc/mysql/mysql.conf.d/mysqld.cnf and it is ok for log ON.
/var/log/mysql/mysql-slow.log is empty too.
Any hint for this?
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!
What do you mean by MySQL goes offline? What error do you get on the page? Is it a “freeze” of pages or an actual DB error connection?
If the DB is actually shutdown, you should be able to see a shutdown/startup in the error log. Otherwise I’d suspect your DB engine is MyISAM, which does table level locks (vs row-level locks) on the whole table and makes editing posts simultaneously not possible.
Run these commands to get a feel of things:
mysql -u root -e "show table status" unixy_whmcs1|grep -i myisam
If you get many MyISAM tables, it’s probably time to switch to InnoDB.
Cheers
Yes I’d definitely switch to InnoDB. This issue would go away. Here’s a quick one liner:
mysql -u root -e "show tables" <my_db> | while read tbl; do echo mysql -u root -e "alter table ${tbl} engine=InnoDB" <my_db>; done
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.