Mailing List Archive

Way to recover from corrupt databases?
Hi,

I just installed mediawiki a week ago. I love the product, but
something seems to be very wrong with the sql databases on which the
wiki is driven. I've gotten corruption about 5 times already. Now,
when I browse to the wiki server, Firefox doesn't even return an empty
page, it looks like php is hanging or crashing (not sure which).

Is there any way to somewhat manually recover data from the databases?
Is there any way to meaningfully export and re-import the data?

Thanks,
-Nick Triantos

p.s. - I'm running mysql 4.0.18 on FreeBSD 4.10. Really no idea why the
databases keep going corrupt. I just updated to mysql 4.0.20 in hopes
that that'll prevent future problems.
Way to recover from corrupt databases? [ In reply to ]
Hi,

I just installed mediawiki a week ago. I love the product, but
something seems to be very wrong with the sql databases on which the
wiki is driven. I've gotten corruption about 5 times already. Now,
when I browse to the wiki server, Firefox doesn't even return an empty
page, it looks like php is hanging or crashing (not sure which).

Is there any way to somewhat manually recover data from the databases?
Is there any way to meaningfully export and re-import the data?

Thanks,
-Nick Triantos

p.s. - I'm running mysql 4.0.18 on FreeBSD 4.10. Really no idea why the
databases keep going corrupt. I just updated to mysql 4.0.20 in hopes
that that'll prevent future problems.
Re: Way to recover from corrupt databases? [ In reply to ]
Nick Triantos wrote:
> I just installed mediawiki a week ago. I love the product, but
> something seems to be very wrong with the sql databases on which the
> wiki is driven. I've gotten corruption about 5 times already. Now,
> when I browse to the wiki server, Firefox doesn't even return an empty
> page, it looks like php is hanging or crashing (not sure which).
>
> Is there any way to somewhat manually recover data from the databases?
> Is there any way to meaningfully export and re-import the data?

Start here: http://dev.mysql.com/doc/mysql/en/Repair.html

-- brion vibber (brion @ pobox.com)
Re: Way to recover from corrupt databases? [ In reply to ]
Thanks. I've gotten very good at repairing the tables over the past
couple of days :-/, but I'd still like to understand the root cause,
and especially if there are more mediawiki-specific tools to try to
recover / export the data if I need it.

I enabled the debug log, and all I see that's suspicious is frequent
abrupt exits from RawPage::view, line 59 of includes/RawPage.php. From
looking at the code, it looks like perhaps that line of code shouldn't
be in that function??

I'm running mediawiki version 1.3.1, btw.

thanks,
-Nick

Brion Vibber wrote:

> Nick Triantos wrote:
>
>> I just installed mediawiki a week ago. I love the product, but
>> something seems to be very wrong with the sql databases on which the
>> wiki is driven. I've gotten corruption about 5 times already. Now,
>> when I browse to the wiki server, Firefox doesn't even return an empty
>> page, it looks like php is hanging or crashing (not sure which).
>>
>> Is there any way to somewhat manually recover data from the databases?
>> Is there any way to meaningfully export and re-import the data?
>
>
> Start here: http://dev.mysql.com/doc/mysql/en/Repair.html
>
> -- brion vibber (brion @ pobox.com)
>
>------------------------------------------------------------------------
>
>_______________________________________________
>MediaWiki-l mailing list
>MediaWiki-l@Wikimedia.org
>http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
>
Re: Way to recover from corrupt databases? [ In reply to ]
Thanks. I've gotten very good at repairing the tables over the past
couple of days :-/, but I'd still like to understand the root cause,
and especially if there are more mediawiki-specific tools to try to
recover / export the data if I need it.

I enabled the debug log, and all I see that's suspicious is frequent
abrupt exits from RawPage::view, line 59 of includes/RawPage.php. From
looking at the code, it looks like perhaps that line of code shouldn't
be in that function??

I'm running mediawiki version 1.3.1, btw.

thanks,
-Nick

Brion Vibber wrote:

> Nick Triantos wrote:
>
>> I just installed mediawiki a week ago. I love the product, but
>> something seems to be very wrong with the sql databases on which the
>> wiki is driven. I've gotten corruption about 5 times already. Now,
>> when I browse to the wiki server, Firefox doesn't even return an empty
>> page, it looks like php is hanging or crashing (not sure which).
>>
>> Is there any way to somewhat manually recover data from the databases?
>> Is there any way to meaningfully export and re-import the data?
>
>
> Start here: http://dev.mysql.com/doc/mysql/en/Repair.html
>
> -- brion vibber (brion @ pobox.com)
>
>------------------------------------------------------------------------
>
>_______________________________________________
>MediaWiki-l mailing list
>MediaWiki-l@Wikimedia.org
>http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
>
Re: Way to recover from corrupt databases? [ In reply to ]
Thanks. I've gotten very good at repairing the tables over the past
couple of days :-/, but I'd still like to understand the root cause,
and especially if there are more mediawiki-specific tools to try to
recover / export the data if I need it.

I enabled the debug log, and all I see that's suspicious is frequent
abrupt exits from RawPage::view, line 59 of includes/RawPage.php. From
looking at the code, it looks like perhaps that line of code shouldn't
be in that function??

I'm running mediawiki version 1.3.1, btw.

thanks,
-Nick

Brion Vibber wrote:

> Nick Triantos wrote:
>
>> I just installed mediawiki a week ago. I love the product, but
>> something seems to be very wrong with the sql databases on which the
>> wiki is driven. I've gotten corruption about 5 times already. Now,
>> when I browse to the wiki server, Firefox doesn't even return an empty
>> page, it looks like php is hanging or crashing (not sure which).
>>
>> Is there any way to somewhat manually recover data from the databases?
>> Is there any way to meaningfully export and re-import the data?
>
>
> Start here: http://dev.mysql.com/doc/mysql/en/Repair.html
>
> -- brion vibber (brion @ pobox.com)
>
>------------------------------------------------------------------------
>
>_______________________________________________
>MediaWiki-l mailing list
>MediaWiki-l@Wikimedia.org
>http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
>
Re: Way to recover from corrupt databases? [ In reply to ]
Nick Triantos wrote:
> Thanks. I've gotten very good at repairing the tables over the past
> couple of days :-/, but I'd still like to understand the root cause,

Basically, there are four possibilities:
* Mistreatment of MySQL such as unexpected kill -9 or power cycling
* Hardware problems (power, RAM, disk, CPU, etc)
* Bug in MySQL
* Bug in operating system

Upgrading to the current MySQL stable release is a good thing to try,
which you've already done. I also *highly* recommend checking your
server's RAM -- we had some terrible problems with bad hardware at
Wikipedia.

One thing you should be sure to do is record what the actual error
messages you're receiving are (don't forget to use the 'perror' command
to get the error messages for the numeric error codes that MySQL spouts)
and check the MySQL error log for anything of interest. If there's a
MySQL bug, you'll want to document the problem so it can be reported and
fixed.

In my experience the most likely table to be corrupted 'mysteriously' is
the searchindex. This may just be because it's relatively large and has
a complicated index which is slow to update and frequently being read,
so has opportunity to get clobbered.

> and especially if there are more mediawiki-specific tools to try to
> recover / export the data if I need it.

Not really, sorry. (When everything's working you can export most page
data also with Special:Export, but the main workhorse for backup/restore
is mysqldump.)

> I enabled the debug log, and all I see that's suspicious is frequent
> abrupt exits from RawPage::view, line 59 of includes/RawPage.php. From
> looking at the code, it looks like perhaps that line of code shouldn't
> be in that function??

Should be harmless. This is for loading the customizable stylesheet
bits; it skips out 'early' to avoid the later calls to all the HTML
template layout.

-- brion vibber (brion @ pobox.com)
Re: Way to recover from corrupt databases? [ In reply to ]
Thanks. I've gotten very good at repairing the tables over the past
couple of days :-/, but I'd still like to understand the root cause,
and especially if there are more mediawiki-specific tools to try to
recover / export the data if I need it. My last time recovering, it
looked like myisamchk deleted some records from the data file, though
I'm not sure if it does that, or just touches the .MYIs.

I enabled the debug log, and all I see that's suspicious is frequent
abrupt exits from RawPage::view, line 59 of includes/RawPage.php. From
looking at the code, it looks like perhaps that line of code shouldn't
be in that function??

I'm running mediawiki version 1.3.1, btw.

thanks,
-Nick

Brion Vibber wrote:

> Nick Triantos wrote:
>
>> I just installed mediawiki a week ago. I love the product, but
>> something seems to be very wrong with the sql databases on which the
>> wiki is driven. I've gotten corruption about 5 times already. Now,
>> when I browse to the wiki server, Firefox doesn't even return an empty
>> page, it looks like php is hanging or crashing (not sure which).
>>
>> Is there any way to somewhat manually recover data from the databases?
>> Is there any way to meaningfully export and re-import the data?
>
>
> Start here: http://dev.mysql.com/doc/mysql/en/Repair.html
>
> -- brion vibber (brion @ pobox.com)
>
>------------------------------------------------------------------------
>
>_______________________________________________
>MediaWiki-l mailing list
>MediaWiki-l@Wikimedia.org
>http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
>
Re: Way to recover from corrupt databases? [ In reply to ]
Sorry about all these redundant messages. My smtp server just freaked
out a bit, and so I was thinking they weren't being sent out.

It's been quite a week. :-(