Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-13-2007, 11:01 PM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Weird and damaging SQL event - my vb_post table just randomly emptied!

Earlier on my site was running very strangely - I kept getting the following SQL error on the forum index and a couple of other pages:

Quote:
Originally Posted by my warning emails
MySQL Error : Got error 12 from storage engine Error Number : 1030
Date : Monday, August 13th 2007 @ 08:03:00 PM


Not being too sure what it was I decided to repair/optimise the tables. There was another db outage in the middle of the optimisation. There were a few like this, a couple of them actually killed phpMyadmin for a while.

When the site eventually came back to life, none of my threads had any posts - I checked the vb_post table and it was empty

"MySQL returned an empty result set (i.e. zero rows). (Query took 0.0002 sec)"

Can anyone shed any light on what happened? Are all 287000+ posts just gone in the twinkling of an eye? Or are they just moved to somewhere my forum can't find them?

Can they be retrieved?
Reply With Quote
  #2  
Old 08-14-2007, 03:53 AM
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Error 12 means the OS was unable to allocate enough memory. What OS are you running, which storage engine are you using, what kind of plan are you on (shared, vps, dedicated).

I think it likely that your posts are gone, but it could instead be a really, really corrupted index file. The best way to check is to look at the file directly. Assuming you are on some kind of vanilla linux and have root access, as root type ls -l /var/lib/mysql/<your db name>/vb_post.*

If you don't have root access or are not using myisam, this will not work.
Reply With Quote
  #3  
Old 08-14-2007, 07:04 AM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Shared linux hosting, not sure what flavour of linux though - got cpanel and sadly no root access.
Reply With Quote
  #4  
Old 08-14-2007, 07:38 AM
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Think you are stuffed mate. Even if you have a backup, there is no guarantee it wont happen again. I'd be moving hosts.
Reply With Quote
  #5  
Old 08-14-2007, 08:57 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the current post table really don't have any rows in it anymore, then you will need to revert to a backup.

Trying to repair the tables while you receive an error 12 is probably the cause of it being emptied.

Please contact your host for the options to repair this and prevent it from happening in the future.
Reply With Quote
  #6  
Old 08-14-2007, 09:38 AM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah looks like it's time to restore from a backup - I'm kicking myself now for not making them a bit more regularly.

Ah well, you live and learn (sometimes)
Reply With Quote
  #7  
Old 08-14-2007, 10:48 AM
deezelpope deezelpope is offline
 
Join Date: Feb 2007
Posts: 1,272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Damn...Poor guy! I feel your pain, Moonclamp! I thought I had lost my entire board last week! A nice guy from here, ZomgStuff, helped me fix it.

Good luck to you.
Reply With Quote
  #8  
Old 08-14-2007, 06:58 PM
moonclamp's Avatar
moonclamp moonclamp is offline
 
Join Date: May 2004
Location: London
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I changed my mind about the backup.

My last one was a bit too old (I'd been lazy) so sent out a mass email saying we needed to work together to get back to how we were.

Anyway, in less than 12 hours we've had 120 new threads and almost 900 new posts - and the atmosphere had been better than it has for a long time - I'm almost grateful it went wrong.

(Good job it wasn't the memberlist that broke though)
Reply With Quote
  #9  
Old 08-16-2007, 12:09 PM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you're too lazy to backup, just set a cron to backup into a file. It's the "Set & Forget" way .
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:47 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07021 seconds
  • Memory Usage 2,242KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete