Whole forum is down due to a corrupt table

Started by backend, May 06, 2018, 03:06:51 AM

Previous topic - Next topic

backend

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....

Aleksi "Lex" Kilpinen

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.
Slava
Ukraini!
"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

How you can help SMF

Illori

have you asked your host if they can repair the table? they may have other ways that you dont have access to.

shawnb61

You can repair tables in phpmyadmin also.

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

backend

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?

Illori

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.

HDB

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.

backend

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.

vbgamer45

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

GigaWatt

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?"..."

backend

Quote from: vbgamer45 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



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.

GigaWatt

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?"..."

Gary

Quote from: backend on July 08, 2018, 02:57:58 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.

shawnb61

Quote from: Gazmanafc on July 08, 2018, 07:52:51 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:
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

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

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

Kindred

#16
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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shawnb61

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

Arantor

Seeing that fulltext is not set by default, I think you'd be safe to run with it.

aegersz

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 160+ 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). My (House) music DJ dedication page is here

Advertisement: