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

Registered: 02/25/07
Posts: 285
Loc: The Netherlands

   Auto repair table to Del.icio.us Add to del.icio.us
  Digg Auto repair table Digg it
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: 439
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..
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

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

Registered: 02/25/07
Posts: 285
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 
Top Posters Last 30 Days
AllenAyres 13
Gizmo 10
willing 2
S7ARBVCK 2
MattUK 1
Kevin H 1
tackaberry 1
Who's Online
1 Registered (Gizmo), 31 Guests and 10 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Noob - need help, or a reality check!
by Gizmo
Yesterday at 03:21 AM
Here I am! Rock me like a Hurricane!
by AllenAyres
09/02/08 03:05 PM
[7.x] Generic Page Outside of forum directory
by Gizmo
08/30/08 05:43 PM
Team UBBDev Rides Again!
by Gizmo
08/28/08 11:45 PM
Multiple Identity Detector
by MattUK
08/28/08 04:10 PM
[7.3.x] ubb.links
by AllenAyres
08/26/08 09:57 AM
Installing FlashChat with 7.3
by Gizmo
08/23/08 05:36 AM
New Mods
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
veedubb8, twentyseven, Claus1, welcomeback1, Paug
13327 Registered Users

 

 

 
fusionbb message board php hacks