Advertisement:
GCWebhosting

Author Topic: Whole forum is down due to a corrupt table  (Read 8158 times)

Offline backend

  • Jr. Member
  • **
  • Posts: 192
Whole forum is down due to a corrupt table
« on: May 06, 2018, 03:06:51 AM »
Visited my forum few days ago to find it down worth the following message :

“smf_messages' is marked as crashed and last (automatic?) repair failed”

I tried repairing it in phpmyadmin and I wasn’t able to


Anyone how else I can fix this? Better yet, what is the function of this table and can I simply get a new version of this table created and if so , how....

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,409
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Whole forum is down due to a corrupt table
« Reply #1 on: May 06, 2018, 03:09:40 AM »
It stores all your forum's posts, so you may be facing a situation where you need to restore a backup. Hope you have one.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,983
Re: Whole forum is down due to a corrupt table
« Reply #2 on: May 06, 2018, 06:11:23 AM »
have you asked your host if they can repair the table? they may have other ways that you dont have access to.

Offline shawnb61

  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,262
    • sbulen on GitHub
Re: Whole forum is down due to a corrupt table
« Reply #3 on: May 06, 2018, 12:20:25 PM »
You can repair tables in phpmyadmin also.

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline backend

  • Jr. Member
  • **
  • Posts: 192
Re: Whole forum is down due to a corrupt table
« Reply #4 on: May 06, 2018, 03:23:28 PM »
I called GoDaddy and after an hour of back and fourth, they tell me they don't have any other backup of my forum other than one from Feb 4, 2018!!!! They said my DB doesn't allow direct access, so no backups were being made. Such crap!!!!!

So I have a backup of this corrupt table (Backup_smf_messages) - is there an easy way to copy its content to smf_messages?

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,983
Re: Whole forum is down due to a corrupt table
« Reply #5 on: May 06, 2018, 03:36:11 PM »
do you know when that backup was made? it is possible it was made when you were upgrading from one version of SMF to another, if so that version of the table would need to be upgraded and would be missing a lot of data.

as a host they should have FULL access of everything on the server including the database. this is a good time for you to find a new host that does include regular backup's.

Offline HDB

  • Charter Member
  • Jr. Member
  • *
  • Posts: 175
    • HDBForum on Facebook
    • @HDBitchin on Twitter
    • HDBitchin, a Harley Davidson Technical Discussion Forum
Re: Whole forum is down due to a corrupt table
« Reply #6 on: May 06, 2018, 07:42:25 PM »
Sorry to hear that you are having problems. Some hosts do backups as part of their hosting package but not GoDaddy. They sell a backup service. GoDaddy sells a service from Drop My Site. You will also see that you can do manual backups yourself in cPanel or you can schedule a cron job in cPanel for automatic scheduled backups of your database.

I hope you can fix your current DB.

Offline backend

  • Jr. Member
  • **
  • Posts: 192
Re: Whole forum is down due to a corrupt table
« Reply #7 on: June 19, 2018, 09:59:22 PM »
Hi guys,

So I was able to restore from a backup that GoDaddy. But here is the problem: after I restore, every couple of days, the DB will crash again with the same error message:

"“smf_messages' is marked as crashed and last (automatic?) repair failed”"

I called the host and spent close to half an hour trying to see what the problem is, and they couldn't find anything or what is causing this.

I am really at a loss. I have lost months worth of posts on my forum due to this error message and having to restore every couple of days. Heck I even gave up on it at times, as I can't keep doing this.

Is there something specific I should look for?
Anyway to ensure I don't get this error message?


I really appreciate any help out there.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 21,391
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Whole forum is down due to a corrupt table
« Reply #8 on: June 19, 2018, 10:04:41 PM »
Table corrupted happens if a server is restarted suddenly or just if a mysql has an unexpected issue. if it happens often it is a database server issue.
You can maybe try switching to Innodb for the smf_messages tab which is a different mysql engine

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,051
  • Gender: Male
    • Macedonian electronics forum
Re: Whole forum is down due to a corrupt table
« Reply #9 on: June 19, 2018, 11:15:17 PM »
If the forum is not too big, try temporarily using a free host, see if the same thing starts happening again... which I seriously doubt after some of the posts I've read about GoDaddy on this forum.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline backend

  • Jr. Member
  • **
  • Posts: 192
Re: Whole forum is down due to a corrupt table
« Reply #10 on: July 08, 2018, 02:57:58 PM »
Table corrupted happens if a server is restarted suddenly or just if a mysql has an unexpected issue. if it happens often it is a database server issue.
You can maybe try switching to Innodb for the smf_messages tab which is a different mysql engine



How would I switch to Innodb?

I have now restored the DB some 6 times and it keeps crashing after 3 days or so. I have given up on trying to restore this again because it will just crash again. And support is being useless.

At the very least, am trying to determine if the problem is with my DB (abo out 1 GB) or something on their side. If the server is being restarted, is that something that would lead to this??? And why would they restart the same server over and over like this , am sssumig there are others on this server that would get affected too.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,051
  • Gender: Male
    • Macedonian electronics forum
Re: Whole forum is down due to a corrupt table
« Reply #11 on: July 08, 2018, 04:50:18 PM »
Try this.

Admin --> Maintenance --> Routine --> Find and repair any errors --> Run task now

Admin --> Maintenance --> Database --> Optimize all tables --> Run task now

Admin --> Maintenance --> Routine --> Empty the file cache --> Run task now
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline Gazmanafc

  • Sorceress's Knight
  • Customizer
  • SMF Super Hero
  • *
  • Posts: 18,055
  • Gender: Male
  • So this is the luck of the draw...
    • Gazmanafc on Facebook
    • garygadsdon on LinkedIn
    • @Gazmanafc on Twitter
    • The Bongo Comics Fan Forum
Re: Whole forum is down due to a corrupt table
« Reply #12 on: July 08, 2018, 07:52:51 PM »
I have now restored the DB some 6 times and it keeps crashing after 3 days or so. I have given up on trying to restore this again because it will just crash again. And support is being useless.

At the very least, am trying to determine if the problem is with my DB (abo out 1 GB) or something on their side. If the server is being restarted, is that something that would lead to this??? And why would they restart the same server over and over like this , am sssumig there are others on this server that would get affected too.


If anything if the issues recur that often, my recommendation at this point in time is to consider moving hosts.
Gary M. Gadsdon
Do NOT PM me unless I say so

War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Offline shawnb61

  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,262
    • sbulen on GitHub
Re: Whole forum is down due to a corrupt table
« Reply #13 on: July 08, 2018, 08:27:23 PM »
If anything if the issues recur that often, my recommendation at this point in time is to consider moving hosts.
+1

Although InnoDB is known to be more stable & crash-resistant, you should also know that it doesn't like getting its tables moved around.  Export/Import is the proper way to relocate InnoDB tables.  If the files are moved via a filesystem-level move or restore, there is an ugly process needed to recover the InnoDB tables.  I'd be nervous that GoDaddy moves them on you unannounced...   

That said, to directly answer your question...  To convert a table to InnoDB, you can either alter a table's engine directly in phpMyAdmin or use SQL to do so.  In phpMyAdmin, pull up the table to view its structure, click on Operations & under Table Options you will see Storage Engine: MyISAM.  You can change it to InnoDB there. 

Alternatively, you can use SQL to do so:
Code: [Select]
ALTER TABLE my_table ENGINE = InnoDB;
I would do all tables.  (My forum is all InnoDB.)   I don't think it does you much good to have messages InnoDB but boards & topics not InnoDB... 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,318
  • Gender: Male
    • Kindred-999 on GitHub
Re: Whole forum is down due to a corrupt table
« Reply #14 on: July 09, 2018, 08:52:59 AM »
IIRC there is a reason why we do not use InnoDB for all tables to start with...


backend...   you don't normally have to restore the database. Usually, you can go in via phpmyadmin and repair the crashed table by itself.
However, regular crashes like that indicate a larger problem with the host and their setup.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline shawnb61

  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,262
    • sbulen on GitHub
Re: Whole forum is down due to a corrupt table
« Reply #15 on: July 09, 2018, 09:10:36 AM »
InnoDB is preferred over MyISAM.    FYI, 2.1 installs will use InnoDB on all tables.   
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,318
  • Gender: Male
    • Kindred-999 on GitHub
Re: Whole forum is down due to a corrupt table
« Reply #16 on: July 09, 2018, 09:39:07 AM »
Quote
InnoDB has row-level locking, MyISAM can only do full table-level locking. InnoDB has better crash recovery. MyISAM has FULLTEXT search indexes, InnoDB did not until MySQL 5.6 (Feb 2013). InnoDB implements transactions, foreign keys and relationship constraints, MyISAM does not

Ah...   that third sentence is why we never did a switch...

As long as we still support (prior to) MySQL 5.6, the lack of fulltext search indexes might be an issue.
« Last Edit: July 12, 2018, 09:30:36 AM by Kindred »
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline shawnb61

  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,262
    • sbulen on GitHub
Re: Whole forum is down due to a corrupt table
« Reply #17 on: July 09, 2018, 10:51:40 AM »
Interesting...  I've always used custom indexes, so I've never seen an issue in 2.x or 2.1. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,215
    • StoryBB/StoryBB on GitHub
Re: Whole forum is down due to a corrupt table
« Reply #18 on: July 12, 2018, 09:01:04 AM »
Seeing that fulltext is not set by default, I think you’d be safe to run with it.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,479
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: Whole forum is down due to a corrupt table
« Reply #19 on: July 13, 2018, 02:36:10 AM »
never had a table crash since moving to InnoDB.

haven't looked back and infrequent DB backups are wonderful.

easy conversion also.
The configuration of my Linux VPS (SMF 2.0 with 145 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum)