I've inherited a LAMP server running centos, which randomly hangs from time to time despite low web traffic.
I've installed Server Density to monitor what's going on, and have found during a hang the following happens:
- There is a spike in iowait to 100%.
- The number of mysql "temporary disk tables" fell from 140,000 to 0.
- There is no load on apache (the server doesn't even respond)
To my untrained eye it looks mysqld is periodically having a purge and locking up the whole server whilst it does the disk IO (which is pretty slow as it's a VM).
How do I change the mysqld config to prevent this?