php forum
php mysql forum
php mysql smarty
 
Topic Options
#317422 - 07/19/08 04:39 AM Auto repair table
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 304
Loc: The Netherlands
My board was down yesterday because of a crashed table.

I am thinking about modding the board to auto repair any crashed table, but I am curious if the experts have any comment on it.

Easiest to code would be in the errorhandler itself, just do a regex like "Table '\./(\w+)/(\w+)' is marked as crashed and should be repaired" on the error message, and do a repair table. But repairing takes a bit of time, and it wouldn't be smart to issue out several repair tables.

The option I have in mind is that the error handler would just write out a repair table sql statement to a file, and a cronjob would do any sql statements in that file, and clear that file afterwards.

Any comments on this? Or is it just plain stupid to try to auto repair.
_________________________

Top
#317423 - 07/19/08 12:07 PM Re: Auto repair table [Re: blaaskaak]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
i'd also be wary of the specific table name. for example, if it's one of the big ones, then you'd want to have your cron change config.inc.php to close the board, while repairing.

posts, topics, privatemessages, users.. come to mind..
_________________________

Top
#317424 - 07/19/08 06:16 PM Re: Auto repair table [Re: sirdude]
blaaskaak Offline
Enthusiast

Registered: 02/25/07
Posts: 304
Loc: The Netherlands
closing the board is something I had in mind too, but I would close it always. If the table is small, the closing will be over quick anyway.
_________________________

Top


Moderator:  sirdude 
Who's Online
0 registered (), 18 Guests and 10 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Wisdom needed
by Gizmo
Yesterday at 10:54 AM
How to hide sub forums from summary page
by blaaskaak
12/03/08 09:54 AM
Spell Check [beta]
by Bill B
12/01/08 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
12/01/08 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
12/01/08 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
12/01/08 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
Truth, David DelMonte, nick1, Begbie, cenk
13364 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks