Table ‘phpbb_sessions’ is marked as crashed and should be repaired
Is caused by a change cPanel made to the MySQL database structure when we moved everything from the old Datacell server to this new Leaseweb.de one. On the old server we forced cPanel not to update because it was doing too many things we didn't like, and we are planning to get rid of cPanel anyways. So on the new server the structure on most databases got pretty screwed up. I've tried to manually fix most of it, but there's still some residual problems.
Eventually we'll move off of this Leaseweb server to somewhere else (without cPanel), which isn't as easy as it sounds. cPanel likes to put a strangle hold on almost every service, making moves to a non-cPanel server a little harder. The final setup after the next move will probably involve VMs (KVM), having things like the websites and the email servers separated for security, also because it will make it easier to do live migrations of a single service (like email) to another network.
Also, I added a script to cronjob (runs every minute) that will notify us when another one of these forum errors pops up, so we don't have to wait for someone to tell us the forum is down. For the curious, the script is:
Code: Select all
if wget -SO- cryptostorm.org 2>&1|grep "General Error"; then
if wget -SO- cryptostorm.org 2>&1|grep "marked as crashed and should be repaired"; then
mysql csorg_phpbb -e'REPAIR TABLE phpbb_sessions'
echo "Forum is spitting out SQL errors, and it's not the phpbb_sessions thing" | mail -s "Forum is screwed up" [email protected]
EDIT: Added more code to the above script to make it check for the mysql.sock error that was on the forum earlier today, but that error causes the website to respond with "HTTP/1.1 503 Service Unavailable" instead of the normal "HTTP/1.1 200 OK". Problem is that the autofixing script uses wget, and wget stops trying to read the webpage if it gets anything but "HTTP/1.1 200 OK". So gotta modify the above a bit...
Oh and as for the mysql.sock error earlier this morning, PJ did that, so feel free blame him