dopetalk

Technology => Technical Stuff => Topic started by: Chip on November 04, 2015, 08:51:27 AM

Title: site died and needed a database restore.
Post by: Chip on November 04, 2015, 08:51:27 AM
i have no idea why the site died and the DB crashed.

some data may have been lost. check this. i take backups often so hopefully any loss will be between 0-6 hours.

these are the only log entries i can find (mysqld):

151103 16:58:46
/usr/libexec/mysqld: Incorrect key file for table './smf209/smf209_sessions.MYI'; try to repair it
151103 16:58:46
Got error 127 when reading table './smf209/smf209_sessions'
[/color]

opened a problem report with SMF, FWIW: http://www.simplemachines.org/community/index.php?topic=540927.0
Title: Re: site died and needed a database restore.
Post by: Chip on November 04, 2015, 09:01:26 AM
from: http://serverfault.com/questions/183725/error-not-found-or-unable-to-stat-in-apache-logs-and-difference-in-httpd-conf

When this error starts populating your logs, you will be unable to access any information from your MySQL table. The fix is easy,

simply run a REPAIR TABLE on the affected table and your issue should be solved.

mysql>REPAIR TABLE <database>.<tablename>

But simply fixing the table wasn’t enough. I wanted to know what caused the table corruption in the first place. After a bit of research it looks like there are a number of possible reasons:

MySQL process is killed unexpectedly
Hardware issues
MySQL code or MyISAM/InnoDB code is suffering from bugs
An external program and server is modifying the same table at the same time
Unexpected system shutdown

... so i really have no real idea of why we failed.
Title: Re: site died and needed a database restore.
Post by: suboxstitute on November 04, 2015, 11:38:32 AM
I posted a reply in the "royals" thread (it was a fairly stupid reply so no biggie) but that post is gone... it was right before the site went down.  If that helps you, Chipper....
Title: Re: site died and needed a database restore.
Post by: Chip on November 04, 2015, 12:09:16 PM
I wish I could work with that but I'm at a loss as to why the system died.

sorry you lost data but next time, I will try to repair the table in question before I restore the whole DB.
Title: Re: site died and needed a database restore.
Post by: Chip on November 04, 2015, 04:57:07 PM
it may be memory related. shirobug suggests I check running processes and free memory every 30 mins. good idea.

sorry about this guys.
SimplePortal 2.3.6 © 2008-2014, SimplePortal